diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2020-05-10 16:47:11 +0200 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2020-05-10 16:47:11 +0200 |
commit | 94721f5ab8af9e7d91a4de58baf2c8d849ceab6e (patch) | |
tree | 92fb34d709310b76de1c2d45cfe2aad8db7a523a /scene/3d/xr_nodes.cpp | |
parent | 6ab92464bc6356f3342c3efd1fc1bb1a5e4467d5 (diff) | |
download | redot-engine-94721f5ab8af9e7d91a4de58baf2c8d849ceab6e.tar.gz |
Revert "Renamed plane's d to distance"
This reverts commit ec7b481170dcd6a7b4cf0e6c1221e204ff7945f3.
This was wrong, `d` is not a distance but the `d` constant in the
parametric equation `ax + by + cz = d` describing the plane.
Diffstat (limited to 'scene/3d/xr_nodes.cpp')
-rw-r--r-- | scene/3d/xr_nodes.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scene/3d/xr_nodes.cpp b/scene/3d/xr_nodes.cpp index 05e282533b..6f41629bac 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.distance; + p.normal /= p.d; Point2 res; res.x = (p.normal.x * 0.5 + 0.5) * viewport_size.x; |