- Home /
Disabling useGravity issue
Hi! I'm having some trouble with Rigidbody. In my game, I need to carry a cube with me, so I disable the useGravity variable in my cube's rigidbody anytime I pick it. It works fine if I just pick it up, carry it around and then leave it. But I found out that when I make it have some collisions with other GameObjects in my map and then enable gravity again, instead of falling straight (as it should) it gets pushed to a side, as if it was applying the collisions which had detected while 'flying'.
I know that using FreezePosition solves this issue, but I'd like to avoid using it because I'll may need to apply a force to the cube while falling. Is there any other way to avoid this from happening?
Thanks!!
you can set the rigidbody velocity to Vector3.zero the moment you enable gravity
Your answer
Follow this Question
Related Questions
How to walk around a 3D sphere? 0 Answers
Constant force, with gravity, and correct collisions. 2 Answers
Physics and gravity of my 3D model 0 Answers
how to make an object fall slowly ? 2 Answers