diff options
author | tpart <tpart120@proton.me> | 2024-06-23 14:28:46 +0200 |
---|---|---|
committer | metamuffin <metamuffin@disroot.org> | 2024-06-23 19:32:56 +0200 |
commit | 50ea7e15d0a6185d9114cf9ac8337c3558334fd4 (patch) | |
tree | 055d5c82897ddb418a0230e2e102c56c4af666e8 /client/scripts/mirror.gd | |
parent | 85e478653a308d05884db8a0c69ac2d0dcda21eb (diff) | |
download | hurrycurry-50ea7e15d0a6185d9114cf9ac8337c3558334fd4.tar hurrycurry-50ea7e15d0a6185d9114cf9ac8337c3558334fd4.tar.bz2 hurrycurry-50ea7e15d0a6185d9114cf9ac8337c3558334fd4.tar.zst |
Add character hand animations
Diffstat (limited to 'client/scripts/mirror.gd')
-rw-r--r-- | client/scripts/mirror.gd | 16 |
1 files changed, 16 insertions, 0 deletions
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) |