summaryrefslogtreecommitdiff
path: root/scene/3d/xr_nodes.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'scene/3d/xr_nodes.cpp')
-rw-r--r--scene/3d/xr_nodes.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/scene/3d/xr_nodes.cpp b/scene/3d/xr_nodes.cpp
index b04c7e2858..ebfb58e9fe 100644
--- a/scene/3d/xr_nodes.cpp
+++ b/scene/3d/xr_nodes.cpp
@@ -30,9 +30,8 @@
#include "xr_nodes.h"
-#include "core/input/input.h"
+#include "scene/main/viewport.h"
#include "servers/xr/xr_interface.h"
-#include "servers/xr_server.h"
////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -124,7 +123,7 @@ Point2 XRCamera3D::unproject_position(const Vector3 &p_pos) const {
return res;
};
-Vector3 XRCamera3D::project_position(const Point2 &p_point, float p_z_depth) const {
+Vector3 XRCamera3D::project_position(const Point2 &p_point, real_t p_z_depth) const {
// get our XRServer
XRServer *xr_server = XRServer::get_singleton();
ERR_FAIL_NULL_V(xr_server, Vector3());
@@ -544,7 +543,7 @@ void XROrigin3D::clear_tracked_camera_if(XRCamera3D *p_tracked_camera) {
};
};
-float XROrigin3D::get_world_scale() const {
+real_t XROrigin3D::get_world_scale() const {
// get our XRServer
XRServer *xr_server = XRServer::get_singleton();
ERR_FAIL_NULL_V(xr_server, 1.0);
@@ -552,7 +551,7 @@ float XROrigin3D::get_world_scale() const {
return xr_server->get_world_scale();
};
-void XROrigin3D::set_world_scale(float p_world_scale) {
+void XROrigin3D::set_world_scale(real_t p_world_scale) {
// get our XRServer
XRServer *xr_server = XRServer::get_singleton();
ERR_FAIL_NULL(xr_server);