Merge pull request #44904 from maiself/fix-plane-xform_inv

Fix xform_inv of Plane, intermediate results were ignored
This commit is contained in:
Rémi Verschelde 2021-01-05 15:15:17 +01:00 committed by GitHub
commit 8fd3545753
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -144,8 +144,8 @@ _FORCE_INLINE_ Plane Transform::xform(const Plane &p_plane) const {
_FORCE_INLINE_ Plane Transform::xform_inv(const Plane &p_plane) const {
Vector3 point = p_plane.normal * p_plane.d;
Vector3 point_dir = point + p_plane.normal;
xform_inv(point);
xform_inv(point_dir);
point = xform_inv(point);
point_dir = xform_inv(point_dir);
Vector3 normal = point_dir - point;
normal.normalize();