raylib»Forums
clapclem
3 posts
Change bounds.position and size

Hello,

I need help.

I change the position of the model =>

Vector3 position = { 0.0f, 0.0f, 0.0f };

to

Vector3 position = { 50.0f, 0.0f, 0.0f };

Bounds are calculated from the original size of the model. if model is scaled on drawing, bounds must be also scaled

I try to put this,

bounds.min = Vector3Scale(bounds.min, 0.1f);

bounds.max = Vector3Scale(bounds.max, 0.1f);

but end up with these errors.

practice.c:55:18: warning: implicit declaration of function 'Vector3Scale' [-Wimplicit-function-declaration] 55 | bounds.min = Vector3Scale(bounds.min, 0.1f); | ^~~~~~~~~~~~

practice.c:55:18: error: incompatible types when assigning to type 'Vector3' from type 'int'

practice.c:56:18: error: incompatible types when assigning to type 'Vector3' from type 'int' 56 | bounds.max = Vector3Scale(bounds.max, 0.1f); | ^~~~~~~~~~~~

How can I change the position of bounds to adapt the new position of the model ?

Thanks :)

Simon Anciaux
1341 posts
Change bounds.position and size
Edited by Simon Anciaux on

I apologize for my reply on the other thread, it could have been better written.

I don't know much about raylib, but the error message here indicates that there is no Vector3Scale function defined in your code. Are you missing a #include "raymath.h" maybe ?

You might get better/faster help if you ask on the raylib discord https://discord.gg/raylib