![]() |
Attention | Topic was automatically imported from the old Question2Answer platform. |
![]() |
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))