0 votes

What's with the angles given/set by get_rot() and set_rot()? I don't understand what they are "in" - it seems like radians, but then you get these negative numbers..?

in Engine by (148 points)

They are in radians. What values are you seeing? Negative values just mean rotations in the opposite direction, i.e. PI/2 versus -PI/2.

Note that if you want to use degrees you can use get_rotd() and set_rotd().

How strange - I expected get_rot() to always return a number from 0 to 2PI, but it just stays however you set it! So if I set_rot(3PI), get_rot()returns 3PI, not PI.

(Make your comment into an answer and I'll accept it.)

1 Answer

0 votes
Best answer

The angles are in radians. Negative values just mean rotations in the opposite direction, i.e. PI/2 versus -PI/2.

Note that if you want to use degrees you can use get_rotd() and set_rotd().

by (21,920 points)
selected by

This should be documented. There's no documentation on get_rotd at all in the stable doc.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.