aught
This commit is contained in:
parent
081459a329
commit
407732681c
|
@ -3,7 +3,7 @@ using System.Collections.Generic;
|
||||||
|
|
||||||
public partial class XRHand : XRController3D
|
public partial class XRHand : XRController3D
|
||||||
{
|
{
|
||||||
List<PinJoint3D> joints = new();
|
List<Generic6DofJoint3D> joints = new();
|
||||||
|
|
||||||
[Export]
|
[Export]
|
||||||
StaticBody3D body;
|
StaticBody3D body;
|
||||||
|
@ -42,18 +42,12 @@ public partial class XRHand : XRController3D
|
||||||
|
|
||||||
GD.Print("Picked up ", body);
|
GD.Print("Picked up ", body);
|
||||||
|
|
||||||
PinJoint3D joint = new();
|
Generic6DofJoint3D joint = new();
|
||||||
joint.NodeA = GetPathTo(body);
|
joint.NodeA = body.GetPath();
|
||||||
joint.NodeB = GetPath();
|
joint.NodeB = GetPath();
|
||||||
joints.Add(joint);
|
joints.Add(joint);
|
||||||
|
|
||||||
PinJoint3D joint2 = new();
|
|
||||||
joint2.NodeB = GetPathTo(body);
|
|
||||||
joint2.NodeA = GetPath();
|
|
||||||
joints.Add(joint2);
|
|
||||||
|
|
||||||
AddChild(joint);
|
AddChild(joint);
|
||||||
body.AddChild(joint2);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue