Refactor OrientedBoundingBox to use Transform for transformation instead of Matrix (for large worlds)
This commit is contained in:
@@ -122,7 +122,8 @@ namespace FlaxEngine
|
||||
|
||||
canvasRoot.Canvas.GetWorldMatrix(out Matrix world);
|
||||
Matrix.Translation(min.X + size.X * 0.5f, min.Y + size.Y * 0.5f, 0, out Matrix offset);
|
||||
Matrix.Multiply(ref offset, ref world, out bounds.Transformation);
|
||||
Matrix.Multiply(ref offset, ref world, out var boxWorld);
|
||||
boxWorld.Decompose(out bounds.Transformation);
|
||||
return bounds;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user