From 50ea7e15d0a6185d9114cf9ac8337c3558334fd4 Mon Sep 17 00:00:00 2001 From: tpart Date: Sun, 23 Jun 2024 14:28:46 +0200 Subject: Add character hand animations --- client/scripts/mirror.gd | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 client/scripts/mirror.gd (limited to 'client/scripts/mirror.gd') diff --git a/client/scripts/mirror.gd b/client/scripts/mirror.gd new file mode 100644 index 00000000..a5cb9c59 --- /dev/null +++ b/client/scripts/mirror.gd @@ -0,0 +1,16 @@ +@tool + +# Hand mirror helper script, useful for animating characters + +extends Node3D + +@export var enabled := true + +@onready var hand_right = $Main/HandRight +@onready var hand_left = $Main/HandLeft + + +func _process(delta): + if enabled: + hand_right.position = hand_left.position * Vector3(-1,1,1) + hand_right.rotation = hand_left.rotation * Vector3(1, -1, -1) - Vector3(0.2 * PI, 0, 0) -- cgit v1.2.3-70-g09d2