Closed nirajupadhyay11 closed 6 years ago
Sleep has a default setting to dampen movement that is causing the slowdown.
Change it by decreasing the linearDamping
and angularDamping
properties.
The shaking I suspect is caused by using the velocity component on a dynamic body. I would try using the applyImpulse
/applyLocalImpulse
Cannon body methods instead. See example here: https://github.com/quinn-madson/ars-attacks/blob/master/server/static/js/projectile.js
Hi,
I am creating a dynamic body this way -
But, the body becomes very slow, falls to the ground and starts to shake.
If I don't use "sleepy" then the body moves quickly, does not stop after collision and shaking happens in this case as well.
I am looking for a solution to make the body move quickly before the collision, come to a stop after a collision and the shaking needs to stop ( I realize that the shaking is independent of using the sleepy component)
I have spend countless hours trying to solve this. Could you please help?
Thanks, Niraj