Material Box

Material Box

WEB Design & Material Images

Godot - Converting Degrees to Radians

Godot

This code example shows how to convert degrees to radians in GDScript.


GDScript provides the `deg_to_rad()` function to convert degrees to radians.
Pass the angle as an argument.

# Angle
var degrees = 90
# Convert degrees to radians
var radian = deg_to_rad(degrees)

print(radian)
# 1.5707963267949

Godot

TitleGodot - Converting Degrees to Radians

CategoryGodot

Created

Update

AuthorYousuke.U