From f9a4d8ad6ba7f74263e3ee7716427c92f67709b1 Mon Sep 17 00:00:00 2001 From: Nitwel Date: Tue, 28 May 2024 18:36:13 +0200 Subject: [PATCH] also allow for rotation --- app/content/functions/movable.gd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/content/functions/movable.gd b/app/content/functions/movable.gd index b194289..5b3dd75 100644 --- a/app/content/functions/movable.gd +++ b/app/content/functions/movable.gd @@ -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: