Jump to content

Recommended Posts

Posted

How can I manually change the min and max values of a models AABB?

 

I've used the following code which seems to set the model->aabb okay but debugging the entity boxes doesn't show it and the model still disappears at the wrong times.

 

model->aabb.min.x = -256.0;
model->aabb.min.y = -256.0;
model->aabb.min.z = -256.0;
model->aabb.max.x = 256.0;
model->aabb.max.y = 256.0;
model->aabb.max.z = 256.0;
model->aabb.Update();

Posted

This has been asked before, and I don't think you can change by code.

But for workaround I think you can do one of these:

 

1. add an invisible csg box and set it as parent to the model. (not enteirly sure, cant test this atm)

2 .add 8 single verts representing your aabb in the modeler and resave, no faces needed.

  • Upvote 1

HP Omen - 16GB - i7 - Nvidia GTX 1060 6GB

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...