Cleanup 5

This commit is contained in:
W2.Wizard
2021-02-21 11:50:30 +01:00
parent ee76440477
commit 694b20148d
30 changed files with 93 additions and 103 deletions

View File

@@ -1691,8 +1691,7 @@ namespace FlaxEditor.Utilities
orientation = Quaternion.LookRotation(dir, Vector3.Cross(Vector3.Cross(dir, Vector3.Up), dir));
Vector3 up = Vector3.Up * orientation;
box.Transformation = Matrix.CreateWorld(min + vec * 0.5f, dir, up);
Matrix inv;
Matrix.Invert(ref box.Transformation, out inv);
Matrix.Invert(ref box.Transformation, out Matrix inv);
Vector3 vecLocal = Vector3.TransformNormal(vec * 0.5f, inv);
box.Extents.X = margin;
box.Extents.Y = margin;