diff options
Diffstat (limited to 'scene/3d')
-rw-r--r-- | scene/3d/camera_3d.cpp | 2 | ||||
-rw-r--r-- | scene/3d/xr_nodes.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/scene/3d/camera_3d.cpp b/scene/3d/camera_3d.cpp index 871f3119bc..7d02befee6 100644 --- a/scene/3d/camera_3d.cpp +++ b/scene/3d/camera_3d.cpp @@ -376,7 +376,7 @@ Point2 Camera3D::unproject_position(const Vector3 &p_pos) const { Plane p(get_camera_transform().xform_inv(p_pos), 1.0); p = cm.xform4(p); - p.normal /= p.d; + p.normal /= p.distance; Point2 res; res.x = (p.normal.x * 0.5 + 0.5) * viewport_size.x; diff --git a/scene/3d/xr_nodes.cpp b/scene/3d/xr_nodes.cpp index 6f41629bac..05e282533b 100644 --- a/scene/3d/xr_nodes.cpp +++ b/scene/3d/xr_nodes.cpp @@ -111,7 +111,7 @@ Point2 XRCamera3D::unproject_position(const Vector3 &p_pos) const { Plane p(get_camera_transform().xform_inv(p_pos), 1.0); p = cm.xform4(p); - p.normal /= p.d; + p.normal /= p.distance; Point2 res; res.x = (p.normal.x * 0.5 + 0.5) * viewport_size.x; |