Character's arm inverts at a certain angle

Godot Version



Hey, guys. So, I’m having trouble with my character’s arm rotation. When he reaches a certain angle (I believe it is 180° or something close to that), he completely returns the arm to the 0° angle. Here is a video showing what is happening, in its description there will be a print of the lines where I think the error is.
I will also leave the link to my script in the description.

Guys, if you can’t find the problem, please watch it on YouTube

I will be very grateful for your help :pray:

not sure I see the problem. I will say this, in the editor, which is in degrees, you can apply rotations > 360 degrees, but internally they are stored in radians and are normalized to be between 0 and 2Pi (0 to 360 degrees). So if your counting on the rotation to keep increasing it won’t. and it will flip hard from 2Pi to 0 and vice versa, around that 2Pi and 0 threshold.

1 Like

Thanks, friend, it worked. I was having a lot of difficulty and realized that it was actually something so simple lol, but thank you very much for your help, have a great day!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.