transform.Rotate not working beyond 90 / 270 degs with RigidBodies (bug?)

I have a GameObject that is a Kinematic Rigidbody.

I’m trying to rotate this object (with iTween) on the X axis. IT WILL NOT ROTATE BEYOND 90 degrees.

It works when I remove the RigidBody but doesn’t work with it on.

With the RigidBody NOT ATTACHED - it will automatically adjust the Y & Z values by 180 each - thus making it work just fine.

When the RigidBody IS ATTACHED it doesn’t do this automatic adjustment and instead the X axis is clamped between 270 - 90.

This is both true when trying to adjust the value in the Inspector, as well as through code (using transform.Rotate).

This most certainly has to be a bug. Is there a workaround anybody knows of? Thanks.

It’s not a bug. Unity uses quaternions for rotation, and there’s more than one valid way to convert a rotation to euler angles. For example, (0, 0, 0) and (180, 180, 180) are the same rotation. This is why the docs say not to use one axis from eulerAngles; you need to read the entire rotation. In the above example, if you read eulerAngles.x and saw it was 0, then read it again and it was 180, you might think it’s “wrong”, but it’s not, in the context of the entire rotation.

Had you tried `transform.localEulerAngles? this might resolve your problem.

Thanks.