Hi
So I’ve been trying to solve how I can return the axis rotation of an object as a value output between 0 to 360.
Right now I’ve got as far as this:
rotation = (object.transform.rot.toAxisAngle(new Vec4(0,0,1)));
degrees = Math.toDegrees(rotation);
This outputs the correct angle, however it seems to not wrap back around to 0 when it gets to 360, instead it starts counting backwards from 360 to 0, so it takes two full rotations to turn to 0 again.
I’ve tried various solutions from what I can find, however I’m clearly missing a key component here. Also my understanding of Euler rotations is limited so any help would be great!