summaryrefslogtreecommitdiff
path: root/scene/3d
diff options
context:
space:
mode:
authorBastiaan Olij <mux213@gmail.com>2021-12-14 12:44:12 +1100
committerRĂ©mi Verschelde <rverschelde@gmail.com>2022-02-23 12:02:24 +0100
commita78a9fee7194297fca8867b4983deb4da0ba18c2 (patch)
tree342d988883aa6779b8c2014c3723dfcbf97116fa /scene/3d
parent65bae5a3411a6fd2dbfc9f8e364040024fa81b04 (diff)
Implementing OpenXR driver
Diffstat (limited to 'scene/3d')
-rw-r--r--scene/3d/xr_nodes.cpp21
-rw-r--r--scene/3d/xr_nodes.h3
2 files changed, 1 insertions, 23 deletions
diff --git a/scene/3d/xr_nodes.cpp b/scene/3d/xr_nodes.cpp
index b18819c920..efae81e048 100644
--- a/scene/3d/xr_nodes.cpp
+++ b/scene/3d/xr_nodes.cpp
@@ -448,11 +448,6 @@ void XRController3D::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_tracker_hand"), &XRController3D::get_tracker_hand);
- ClassDB::bind_method(D_METHOD("get_rumble"), &XRController3D::get_rumble);
- ClassDB::bind_method(D_METHOD("set_rumble", "rumble"), &XRController3D::set_rumble);
- ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "rumble", PROPERTY_HINT_RANGE, "0.0,1.0,0.01"), "set_rumble", "get_rumble");
- ADD_PROPERTY_DEFAULT("rumble", 0.0);
-
ADD_SIGNAL(MethodInfo("button_pressed", PropertyInfo(Variant::STRING, "name")));
ADD_SIGNAL(MethodInfo("button_released", PropertyInfo(Variant::STRING, "name")));
ADD_SIGNAL(MethodInfo("input_value_changed", PropertyInfo(Variant::STRING, "name"), PropertyInfo(Variant::FLOAT, "value")));
@@ -558,20 +553,6 @@ Vector2 XRController3D::get_axis(const StringName &p_name) const {
}
}
-real_t XRController3D::get_rumble() const {
- if (!tracker.is_valid()) {
- return 0.0;
- }
-
- return tracker->get_rumble();
-}
-
-void XRController3D::set_rumble(real_t p_rumble) {
- if (tracker.is_valid()) {
- tracker->set_rumble(p_rumble);
- }
-}
-
XRPositionalTracker::TrackerHand XRController3D::get_tracker_hand() const {
// get our XRServer
if (!tracker.is_valid()) {
@@ -612,7 +593,7 @@ TypedArray<String> XROrigin3D::get_configuration_warnings() const {
}
}
- bool xr_enabled = GLOBAL_GET("rendering/xr/enabled");
+ bool xr_enabled = GLOBAL_GET("xr/shaders/enabled");
if (!xr_enabled) {
warnings.push_back(TTR("XR is not enabled in rendering project settings. Stereoscopic output is not supported unless this is enabled."));
}
diff --git a/scene/3d/xr_nodes.h b/scene/3d/xr_nodes.h
index 5675cbd944..3079e20dc7 100644
--- a/scene/3d/xr_nodes.h
+++ b/scene/3d/xr_nodes.h
@@ -139,9 +139,6 @@ public:
float get_value(const StringName &p_name) const;
Vector2 get_axis(const StringName &p_name) const;
- real_t get_rumble() const;
- void set_rumble(real_t p_rumble);
-
XRPositionalTracker::TrackerHand get_tracker_hand() const;
XRController3D() {}