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

Shaky body when using api.velocity.set() with fixed velocity

Open tommhuth opened this issue 3 years ago • 0 comments

See the basic demo where a sphere moves at a fixed pace (using api.velocity.set) along a plane: https://codesandbox.io/s/shaky-986lm?file=/src/index.js. the sphere will every now and then exhibit some shakiness, as if the position or velocity is not stable. When the movement of the sphere is hardcoded the behaviour is especially noticeable, and the sphere is clearly skipping around, before becoming stable again.

Is setting the velocity like this a bad idea?

tommhuth avatar Jul 14 '21 11:07 tommhuth