+4 votes

Previously when I used .rotated() on Vector2D in 1.1 it would work and rotate the vector by the specified degrees, however now in 2.0 I'm getting all these weird results with weird angles upon using .move in KinematicBody2D...
Any help appreciated!

in Engine by (69 points)

1 Answer

+7 votes
Best answer

Vector2 uses radians for rotations, instead of degrees.

If so, you can use this instead (90 being the angle in degrees here):

Vector2(5, 3).rotated(deg2rad(90))
by (12,889 points)
edited by
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.