Refactor OrientedBoundingBox to use Transform for transformation instead of Matrix (for large worlds)

This commit is contained in:
Wojtek Figat
2022-06-16 10:51:59 +02:00
parent 995e5bc6ff
commit 9ba117cde3
16 changed files with 168 additions and 780 deletions

View File

@@ -50,7 +50,7 @@ namespace FlaxEditor.SceneGraph.Actors
OrientedBoundingBox bounds;
bounds.Extents = Vector3.Half;
bounds.Transformation = world;
world.Decompose(out bounds.Transformation);
normal = -ray.Ray.Direction;
return bounds.Intersects(ref ray.Ray, out distance);