- Home /
Question by
BoyceCecil · Oct 18, 2021 at 04:51 AM ·
unity 2d
Q about Rigidbody.velocity automatically stop understanding
Update() if(Input.......) {rb.velocity = Vector3 ......} I found that if you get the input then the gameObject move, if you let the input go, then the gameObject almost stop moving immediately. I set the friction to zero and it still stop on its own. I only set the velocity to a Vector not equal to zero, I never code it to stop. WHY??? THXX a lot!
Comment
Best Answer
Answer by Rechronicle · Oct 18, 2021 at 07:37 AM
it's because when you let the input go, it actually input the value 0 there, resulting in the gameObject stopping. Unless if you're using AddForce to move your gameObject.
no problem, I'm also still learning about Unity. Good luck!
Your answer