How to eliminate jitter when attempting to move outside of clamp
See original GitHub issueWhen attempting to move outside of clamp bounds, the entire world jitters horribly. The world essentially seizures until the deceleration brings it back to the clamping bounds.
My plugins are as follows:
new Viewport({
// ... required screen and world width/heights
})
.clamp({ direction: 'all', underflow: 'center' })
.drag()
.pinch()
.decelerate()
I’ve tried using bounce options, different frictions, etc. but nothing seems to make the move just stop when hitting the clamp bounds.
My ideal behavior would be that if a move is attempted that would bring the view outside of the clamp bounds, it would just not perform that move. Any tips on how to implement this?
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (1 by maintainers)
Top Results From Across the Web
How to smooth damp towards a moving target without causing ...
How to smooth damp towards a moving target without causing jitter in the movement · 1) Do it in FixedUpdate instead · 2)...
Read more >How to remove Camera Movement Jitter - Questions - Babylon.js
Hey guys… I cam moving a FreeCamera around my scene using a Lerp and directly setting the Position but i get some camera...
Read more >How do I. Avoid jitters in a retro project - Game Building Help
As the camera "settles" on the player when you stop moving, it will jitter 1px to the right, then 1px to the left,...
Read more >Fixing jitter and stutter - Godot Docs
To avoid this, starting with 3.1, Godot raises the game priority to "Above Normal". This helps considerably but may not completely eliminate stutter....
Read more >How To Fix Jittering Details and Improve Your Video Quality
Jitteting of Details ( JItter ) along with digital noise can make your footage unusable. It can remind you of some sort of...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
It works when you call
.clamp()
after setting the drag options. Vice versa you get this jittering if dragging outside the world bounds.We actually ended up pushing the
clamp()
ticker solution to prod, so I can’t just point you at our site anymore. I’ll try and make a reproduction on codesandbox soon.