- Home /
Stop rotation on collision
Ive got a ball that has torque applied to it to make it spin, i want it to completely stop rotating when it hits a wall so i can add a different torque to it, but i can't do it.. but i want the velocity to remain! now due to the type of game I've got physics material on the ball and walls which make it frictionless and because the velocity needs to remain changing the drag/angular drag isn't an option also freeze rotation isn't an option because i need to apply a new torque to it!!
any help would be greatly appreciated :)
Answer by robertbu · Aug 11, 2014 at 01:52 PM
Have you tried just setting the 'Rigidbody.angularVelocity' to 0.0 during OnCollisionEnter() and OnCollisionStay() callbacks?
I just tried that and it works perfectly thank you very much, great help!!
Your answer
Follow this Question
Related Questions
Rotating an object according to the force. 1 Answer
On Collision my Player Spins Wildly 2 Answers
transform.forward does not work with Rotate(Vector3.up) 0 Answers
how can i stop rotation without stopping y axis 2 Answers
Make a camera collision 1 Answer