diff --git a/scripts/XRHand.cs b/scripts/XRHand.cs index a9066c2..92a511b 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] StaticBody3D body; @@ -42,18 +42,12 @@ public partial class XRHand : XRController3D GD.Print("Picked up ", body); - PinJoint3D joint = new(); - joint.NodeA = GetPathTo(body); + Generic6DofJoint3D joint = new(); + joint.NodeA = body.GetPath(); joint.NodeB = GetPath(); joints.Add(joint); - PinJoint3D joint2 = new(); - joint2.NodeB = GetPathTo(body); - joint2.NodeA = GetPath(); - joints.Add(joint2); - AddChild(joint); - body.AddChild(joint2); } } }