How can I avoid Gimbal Lock with Rotations?

Thanks for that. I’m modifying an Actor’s transformation directly so hopefully this should behave ok. I’m getting odd flipping around the poles (gimbal) so hopefully this can help with that.
cheers