mirror of
https://github.com/raysan5/raylib.git
synced 2025-09-06 03:18:14 +00:00
REVIEWED: GetModelBoundingBox()
#3485
This commit is contained in:
@@ -1170,6 +1170,12 @@ BoundingBox GetModelBoundingBox(Model model)
|
|||||||
bounds.max = temp;
|
bounds.max = temp;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 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;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user