Can you tell me the difference between rotation_degrees and rotation? Problem in the Camera rotation

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By abbos

For example, why in this code rotation_degrees is used to define rotation on the y-axis of the mouse, but rotation is used to limit it?
Does rotation mean that the x-axis rotation in the engine is limited to 70 degrees?

func _input(event):
if event is InputEventMouseMotion:
rotation_degrees.y += -event.relative.x * 0.3
rotation_degrees.x += -event.relative.y * 0.3
rotation.x = clamp(rotation.x , deg2rad(-70) , deg2rad(70))

:bust_in_silhouette: Reply From: deaton64

Hi,

I quote “Godot represents all rotations with radians, not degrees.”

So rotation is set in radians… ie. deg2rad(70)
rotation_degrees is rotation in degrees.