From 0f2b5c964b2646ebbcc2f02119c24b56718b40e8 Mon Sep 17 00:00:00 2001 From: Aerton Oliveira <38568712+Cafezinhu@users.noreply.github.com> Date: Tue, 24 Sep 2024 21:45:49 -0300 Subject: [PATCH] [fix] default camera and controller positions make player body emit errors --- addons/xr-simulator/XRSimulator.gd | 3 +++ 1 file changed, 3 insertions(+) diff --git a/addons/xr-simulator/XRSimulator.gd b/addons/xr-simulator/XRSimulator.gd index c598783..4d9ca4e 100644 --- a/addons/xr-simulator/XRSimulator.gd +++ b/addons/xr-simulator/XRSimulator.gd @@ -44,13 +44,16 @@ var key_map = { func _on_node_added(node: Node): if node is XRCamera3D: camera = node + camera.rotate_y(deg_to_rad(1.0)) elif node is XRController3D: var pose = node.pose if node.tracker == "left_hand": + node.position.x += -0.1 left_controller = node left_tracker.set_pose(pose, node.transform, Vector3.ZERO, Vector3.ZERO, XRPose.XR_TRACKING_CONFIDENCE_HIGH) XRServer.add_tracker(left_tracker) elif node.tracker == "right_hand": + node.position.x += 0.1 right_controller = node right_tracker.set_pose(pose, node.transform, Vector3.ZERO, Vector3.ZERO, XRPose.XR_TRACKING_CONFIDENCE_HIGH) XRServer.add_tracker(right_tracker)