unity3d - Unity - How to Smooth Out Constant Velocity on Rigidbody2D -
i setting constant velocity character movement in 2d game. since using method character seems shaking little. there way fix , smooth movement out?
here set velocity in update function:
constantvelocity = new vector3 (playerinputx * speed, playerinputy * speed, 0);
i apply velocity the rigidbody2d component in fixedupdate function.
there 2 ways this.
- you can use
time.fixeddeltatime
smoothen player movement. - you can try low pass filtering on our constantvelocity.
Comments
Post a Comment