#How do I get the 2d rotation angle in radians of a Transform?
26 messages · Page 1 of 1 (latest)
I've tried multiplying transform.rotation.z by PI but that also leads to weird values
to_axis_angle() claims to be in radians
It is, but, for some reason it also inverts your angle when its between 180-360?
so 181 becomes 179
and 179 is still 179?
add tau/2?
is the rotation axis inverted
I don't think so? both of these images return about 1.57 using to_axis_angle()
despite facing opposite directions
(hypothesis) like in one case the axis is Vec3::Z and in the other it's Vec3::NEG_Z
I'll give it a test
facing left side gives this
facing right side gives this
so yup!
This works!
but
it feels like a really janky way just to get the angle lol
I think it's trying to find the axis which gives the mimum angle
why it does that idk
yeah it's quite strange