SpiderPig Posted April 17, 2017 Share Posted April 17, 2017 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(); Quote Link to comment Share on other sites More sharing options...
shadmar Posted April 17, 2017 Share Posted April 17, 2017 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. 1 Quote HP Omen - 16GB - i7 - Nvidia GTX 1060 6GB Link to comment Share on other sites More sharing options...
SpiderPig Posted April 17, 2017 Author Share Posted April 17, 2017 Thanks shadmar. I found adding the extra 8 verts in and updateing the AABB is good enough for now. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.