REVIEWED: GetModelBoundingBox() #3485

This commit is contained in:
Ray
2023-10-30 20:41:33 +01:00
parent b8fce54c0f
commit 7677e4b928

View File

@@ -1171,6 +1171,12 @@ BoundingBox GetModelBoundingBox(Model model)
} }
} }
// Apply model.transform to bounding box
// WARNING: Current BoundingBox structure design does not support rotation transformations,
// in those cases is up to the user to calculate the proper box bounds (8 vertices transformed)
bounds.min = Vector3Transform(bounds.min, model.transform);
bounds.max = Vector3Transform(bounds.max, model.transform);
return bounds; return bounds;
} }