I have a simple demo project where my “player object” has a rotation of 0, 45, 0 (xyz).
When I use code to extract this it shows -2.912, 45, -1.969
I use the code:
transform.rotation.eulerAngles;
Why isn’t this shown correctly. I use the rotation for launching a projectile, so it’s a bit weird having the direction of the projectiles turn quicker than my placeholder object
Hi there. Extending on from tormentoarmagedoom’s answer, it is probably because you have a parent object of the object you are trying to rotate. I have had issues with rotation and positioning in the past, and that was my issue. Perhaps you could try using LocalEulerAngles in your code instead of just EulerAngles, so your code will look something like this ‘transform.rotation.localEulerAngles;’. See if that works and hopefully it will solve your problem!