Question by
ElevenStorms · Feb 24, 2016 at 04:04 PM ·
quaternionissueeulerlocalrotation
How to test for rotation?
if (transform.localRotation == Quaternion.Euler (0, 0, 180) && thePlayer.vehicleMovementX > 0)
this.thrust();
this should work but it doesn't. Could somone more experienced see the issue? Becuase i don't see anything wrong
also "thePlayer" is a variable for the playercontroller and this code does work when i remove the rotation check.
Comment
Your answer
![](https://koobas.hobune.stream/wayback/20220612065441im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
transform.localRotation = Quaternion.RotateTowards() or Quaternion.Euler fails on vertical axis 1 Answer
Quaternion/World Local rotation problem 0 Answers
Strange 2D Physics Behavior 0 Answers
Keydoor problem 0 Answers
How can I set rotation properly? 0 Answers