Change bounds.position and size

Hello,

See this example : Raylib Examble

I change the position of the model => Vector3 position = { 0.0f, 0.0f, 0.0f }; to Vector3 position = { 0.0f, 50.0f, 0.0f };
I change the size of the model => DrawModel(model, position, 1.0f, WHITE); to DrawModel(model, position, 0.3f, WHITE);

Bounds are calculated from the original size of the model.
How can I change the position and the size of bounds to adapt the new position and the new size of the model ?

Thanks :)

Clem

Edited by ClemClem on Reason: Initial post
There's actually a hint in the code! It says that the bounds are calculated from the original size of the model,
if model is scaled on drawing, bounds must be also scaled.

That's just a matter of scaling the bounds like this:

1
2
3
float Scale = 0.3f;
bounds.min = Vector3Scale(bounds.min, Scale);
bounds.max = Vector3Scale(bounds.max, Scale);

Hello,

thank you for this answer Tjom2000 :)
Yeap, that's the answer, bounds should be manually recalculated by the user.