use-cannon icon indicating copy to clipboard operation
use-cannon copied to clipboard

Changing camera position and rotation causing vibration/stuttering

Open kajumito opened this issue 3 years ago • 5 comments

When changing camera position, and rotation same time I'm getting weird vibration / stuttering in objects around.

This started happening after I updated packages. I did some debugging, and found out that updating use-cannon from v0.5.4 -> v0.5.5 causes this issue or atleast made it more visible. Also after this update velocity to useSphere changes, and movement is lot slower.

Smoother with old packages (first part of the video): https://codesandbox.io/s/minecraft-old-packages-forked-fv5wm Stuttering with updated packages (latter part of the video): https://codesandbox.io/s/minecraft-new-packages-b5efn

https://user-images.githubusercontent.com/15631080/139073739-62864fbe-29c7-4702-9e27-0a5a8c3b587d.mov

After some testing I saw that there is small stuttering on older packages aswell, but it's lot harder to spot.

kajumito avatar Oct 27 '21 13:10 kajumito

v0.5 is very old, any chance you could try a modern version?

bjornstar avatar Oct 27 '21 14:10 bjornstar

It's happening on all versions v0.5.5 onwards.. It was just the point where change happened that causes this bug. I just wanted to point out the specific version where this bug originates from based on my debugging.

kajumito avatar Oct 27 '21 14:10 kajumito

So I guess this specific PR #160, not sure tho!

kajumito avatar Oct 27 '21 15:10 kajumito

It's not noticeable to me while using a trackpad on either a high-spec or a low-spec laptop. It's possible that if I were using a mouse it might feel worse.

Another possibility is the highlighting causing some hiccups, is it better without that?

bjornstar avatar Nov 02 '21 16:11 bjornstar

Hmm, it's even worse with trackpad for me.. Bug is not specific to this scene. Hard to say why it's not visible for you :S

kajumito avatar Nov 08 '21 17:11 kajumito