Jump to content

Show Boxes


Rick
 Share

Recommended Posts

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.

Link to comment
Share on other sites

..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 ? ..

 

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

 Share

×
×
  • Create New...