also allow for rotation

This commit is contained in:
Nitwel 2024-05-28 18:36:13 +02:00
parent 2eb79e9840
commit f9a4d8ad6b

View File

@ -43,7 +43,7 @@ func _on_action_value(event: EventAction):
if event.name != "primary"||event.initiator != initiator:
return
relative_transform = relative_transform.translated(Vector3(0, 0, -event.value.y * 0.05))
relative_transform = relative_transform.translated(Vector3(0, 0, -event.value.y * 0.05)).rotated_local(Vector3(0, 1, 0), event.value.x * 0.05)
func _on_grab_down(event: EventPointer):
if disabled: