From eb5304842ab566d5c5a53e01c60d532d016971c8 Mon Sep 17 00:00:00 2001 From: Fabio Alessandrelli Date: Sun, 10 Jan 2021 11:03:50 +0100 Subject: [PATCH] Fix WebXR module. Some functions and enums were renamed in 4.0 but not updated in the WebXR code. --- modules/webxr/webxr_interface_js.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/webxr/webxr_interface_js.cpp b/modules/webxr/webxr_interface_js.cpp index 72dc4790ac4..65945531469 100644 --- a/modules/webxr/webxr_interface_js.cpp +++ b/modules/webxr/webxr_interface_js.cpp @@ -375,11 +375,11 @@ void WebXRInterfaceJS::_update_tracker(int p_controller_id) { if (godot_webxr_is_controller_connected(p_controller_id)) { if (tracker == nullptr) { tracker = memnew(XRPositionalTracker); - tracker->set_type(XRServer::TRACKER_CONTROLLER); + tracker->set_tracker_type(XRServer::TRACKER_CONTROLLER); // Controller id's 0 and 1 are always the left and right hands. if (p_controller_id < 2) { - tracker->set_name(p_controller_id == 0 ? "Left" : "Right"); - tracker->set_hand(p_controller_id == 0 ? XRPositionalTracker::TRACKER_LEFT_HAND : XRPositionalTracker::TRACKER_RIGHT_HAND); + tracker->set_tracker_name(p_controller_id == 0 ? "Left" : "Right"); + tracker->set_tracker_hand(p_controller_id == 0 ? XRPositionalTracker::TRACKER_HAND_LEFT : XRPositionalTracker::TRACKER_HAND_RIGHT); } // Use the ids we're giving to our "virtual" gamepads. tracker->set_joy_id(p_controller_id + 100);