use-cannon
use-cannon copied to clipboard
Shaky body when using api.velocity.set() with fixed velocity
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?