How to convert degrees to radians in Godot?

Conversion of Degrees to Radians in Godot

To convert degrees to radians in the Godot game engine, you can use the deg2rad() function. This function takes an angle in degrees and returns the equivalent angle in radians.

Here is an example:

var degree = 90
var radian = deg2rad(degree)

Conversion Table

DegreesRadians
30°π/6 rad
90°π/2 rad
180°π rad
360°2π rad

Keep in mind, Godot's rotation is usually expressed in radians, not degrees.