|Attention||Topic was automatically imported from the old Question2Answer platform.|
I am trying to rotate a camera around a FocusPoint (Spatial). The camera is child of FocusPoint. The code below works as long as only one axis is rotated at a time. It quickly goes all wonky when both axes are used. I have been reading the Godot 3D docs and trying to understand Transforms but I need some tips.
if event is InputEventMouseMotion and is_camera_dragged: $FocusPoint.rotate_object_local(Vector3(0,0,1), event.relative.y * PI/360) $FocusPoint.rotate_object_local(Vector3(0,-1,0), event.relative.x * PI/360)