This has me a bit stumped.
If I translate the rotation of an object in the editor on the X or Y axis, it behaves as expected.
If I translate the rotation of an object in the editor on the Z axis, it rotates on the Y axis.
If I translate the rotation of an object on the X axis while the game is running, it acts like I am translating it on the Z axis.
If I use this code:
transform.Rotate(0, -30f * Time.deltaTime, 0);
Then I observe the running game, it will rotate it on the Z axis while incrementing the X axis field.
What gives?
Additionally:
This works as expected.
transform.localEulerAngles = transform.localEulerAngles + new Vector3(2, 0, 0);
This works as expected.
transform.localEulerAngles = transform.localEulerAngles + new Vector3(0, 2, 0);
This acts like I am rotating on Y for some reason:
transform.localEulerAngles = transform.localEulerAngles + new Vector3(0, 0, 2);
Edit: I just generated a cube, and everything works as expected with that. Only my model is having problems. I checked my export settings in Maya, and I am exporting Y up. So I can’t figure out what the problem could possibly be.
Edit Again: I deleted all models and used a cube as my base mesh. Once again, it is happening. So it’s not the model doing it. See next post.