Incorrect rotation

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By tem12qaz

I am using the following way to rotate an object:

transform.basis = transform.basis.rotated(new, ang*delta)

Where new is roughly equal to the x-axis and ang * delta <0.001
In general, everything works

But if before that there was a rotation along the z axis. When x-axis rotation is 90 degrees or more, the object is rotated 180 degrees along the y-axis.

I have absolutely no idea what’s going on. I would be very grateful for solving the problem

I’m not a professional but I use this to rotateget_node("your node").rotate_x(deg2rad(YOUR ANGLE)) or use rotate_y or rotate_z if you need that axis

Shlopynoobnoob | 2020-10-06 20:53