From 853c5a506a64a1e358e13802e265305d10e83593 Mon Sep 17 00:00:00 2001 From: Snorre Date: Sat, 5 Apr 2025 18:12:02 +0200 Subject: [PATCH] gjlsdfg: --- scripts/XRHand.cs | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/scripts/XRHand.cs b/scripts/XRHand.cs index 81545df..960f2f3 100644 --- a/scripts/XRHand.cs +++ b/scripts/XRHand.cs @@ -3,7 +3,7 @@ using System.Collections.Generic; public partial class XRHand : XRController3D { - List joints = new(); + List joints = new(); [Export] RigidBody3D body; @@ -42,12 +42,18 @@ public partial class XRHand : XRController3D GD.Print("Picked up ", body); - Generic6DofJoint3D joint = new(); + PinJoint3D joint = new(); joint.NodeA = body.GetPath(); joint.NodeB = this.body.GetPath(); joints.Add(joint); + + PinJoint3D joint2 = new(); + joint2.NodeA = this.body.GetPath(); + joint2.NodeB = body.GetPath(); + joints.Add(joint2); - AddChild(joint); + this.body.AddChild(joint); + body.AddChild(joint2); } } }