Rick Posted April 20, 2012 Share Posted April 20, 2012 In the editor to see the AABB we have a "Show Boxes" check box. Is this only built into the editor or is there an engine command to get this also? Also there are 2 boxes. Yellow and blue. What box is the AABB and what is the other box? Also, how are these created and how can they be adjusted? I'd like to scale some bounding boxes down some since I'm using it for some collision type checks with ForEachEntityInAABB(). I could use extra bodies for these but if it's not to big of a hassle with AABB seems it would be easier than making extra bodies for all my models (since I don't want to use the actual shape of the model itself)). What I'm trying to get going here is placing buildings like in an RTS. I have a semi-transparent ghost of the building that I can move around with the mouse on the terrain. Because this is in the transparent world and all the trees are in the main world, I have a copy of this building in the main world which I show for AABB check and hide afterwards so it's not seen. This is all working great except the AABB for the trees are to big for this and therefore I can't place the building anywhere near trees. I feel like if I could scale down the AABB of the trees this would visually look better and let me place buildings closer to trees. Quote Link to comment Share on other sites More sharing options...
Daimour Posted April 20, 2012 Share Posted April 20, 2012 Is this only built into the editor or is there an engine command to get this also? Try DebugEntities(). Quote Link to comment Share on other sites More sharing options...
Rick Posted April 23, 2012 Author Share Posted April 23, 2012 Forgot to confirm this. Thanks Daimour that worked. Anyone have ideas on the size of the bounding boxes? I would like to alter their size. Quote Link to comment Share on other sites More sharing options...
Naughty Alien Posted April 23, 2012 Share Posted April 23, 2012 ..best way, I think, is to create AABB of your own with properities you can easy control (position, size, alignement), as those tied to entity, I think, are not best way to do what you want, because their size is tied to entity wrapping and i guess by altering it, you will affect engine occlusion ? .. Quote Link to comment Share on other sites More sharing options...
Rick Posted April 23, 2012 Author Share Posted April 23, 2012 Yeah I guess I was trying to kill 2 birds with 1 stone but you're probably right. I suppose I would have to create my own drawing debug method for these custom AABB's too so I can visually see them to make sure they look good. Thanks NA. Quote Link to comment Share on other sites More sharing options...
Naughty Alien Posted April 23, 2012 Share Posted April 23, 2012 ..if you need any help with it, let me know and Ill be happy to help.. Quote Link to comment Share on other sites More sharing options...
Rick Posted April 23, 2012 Author Share Posted April 23, 2012 Thanks NA. For now I think I'll just copy the models AABB and shrink it some on a per model basis and pass that new AABB to the ForEachEntityInAABBDo(). I got the placement code finished and able to move my 5 little villagers around the map! I'm finding programing RTS gameplay is pretty enjoyable. 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.