Fixed transports.

This commit is contained in:
hondacrx
2022-06-21 22:35:20 -04:00
parent d42733e3b4
commit 8b1e02759a
6 changed files with 29 additions and 27 deletions
+1 -1
View File
@@ -72,7 +72,7 @@ namespace Framework.GameMath
// M^-1 * (point - _corner[0]) = point in unit cube's object space
// compute the inverse of M
Matrix4x4.Invert(M, out M);
Vector3 osPoint = Vector3.Transform(point - Corner(0), M);
Vector3 osPoint = Vector3.TransformNormal(point - Corner(0), M);
return (osPoint.X >= 0) && (osPoint.Y >= 0) && (osPoint.Z >= 0) &&
(osPoint.X <= 1) && (osPoint.Y <= 1) && (osPoint.Z <= 1);
+1 -1
View File
@@ -297,7 +297,7 @@ public static class MathFunctions
rotation.M31 * box._center.GetAt(0) + rotation.M32 * box._center.GetAt(1) + rotation.M33 * box._center.GetAt(2) + translation.GetAt(2));
for (int i = 0; i < 3; ++i)
box._edgeVector[i] = Vector3.Transform(box._edgeVector[i], rotation);
box._edgeVector[i] = Vector3.TransformNormal(box._edgeVector[i], rotation);
return box;
}