- Home /
Question by
Bangurah · Jan 28, 2019 at 02:30 PM ·
rotationrigidbodyoncollisionentercondition
prevent a player object from rotating on a moving platform?
I am making a game which you have to control a rocket in a 2.5D plane and I want the rocket to stop rotating om the moving platform. So I did is these in my code and it doesn't work any ideas what I am doing wrong?
2019-01-28-1.png
(98.6 kB)
Comment
Answer by Snipe76 · Jan 28, 2019 at 05:02 PM
What you did is only deny the rocket rotation with external forces.
But transform rotation through code still applies.
You need to stop the rotation through code via condition checking. (If the rocket can rotate or not.)
A simple bool that changes by the situation will do well in your case. (CanRotate = true/false)
Your answer
Follow this Question
Related Questions
Keeping relative rotation to another object 0 Answers
Multiple conditions 2 Answers
Rigidbody goes wonky after collision 0 Answers
OnCollisionExit2D - NotWorking? 0 Answers