Skip to content

Commit

Permalink
Merge pull request #3 from Cafezinhu/godot-4
Browse files Browse the repository at this point in the history
trackers set the pose from the controller instead of always default
  • Loading branch information
Cafezinhu authored Mar 28, 2023
2 parents e31c494 + 0d8b15d commit 4d709cb
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions addons/xr-simulator/XRSimulator.gd
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,14 @@ func _ready():

for child in origin.get_children():
if child.get("tracker"):
var pose = child.pose
if child.tracker == "left_hand" and not child.get_is_active():
left_controller = child
left_tracker.set_pose("default", child.transform, Vector3.ZERO, Vector3.ZERO, XRPose.XR_TRACKING_CONFIDENCE_HIGH)
left_tracker.set_pose(pose, child.transform, Vector3.ZERO, Vector3.ZERO, XRPose.XR_TRACKING_CONFIDENCE_HIGH)
XRServer.add_tracker(left_tracker)
elif child.tracker == "right_hand" and not child.get_is_active():
right_controller = child
right_tracker.set_pose("default", child.transform, Vector3.ZERO, Vector3.ZERO, XRPose.XR_TRACKING_CONFIDENCE_HIGH)
right_tracker.set_pose(pose, child.transform, Vector3.ZERO, Vector3.ZERO, XRPose.XR_TRACKING_CONFIDENCE_HIGH)
XRServer.add_tracker(right_tracker)


Expand Down

0 comments on commit 4d709cb

Please sign in to comment.