Revert "Renamed plane's d to distance"
This reverts commit ec7b481170.
This was wrong, `d` is not a distance but the `d` constant in the
parametric equation `ax + by + cz = d` describing the plane.
This commit is contained in:
parent
6ab92464bc
commit
94721f5ab8
36 changed files with 126 additions and 126 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue