Jump to content

Check if AABB intersects with CSG


thehankinator
 Share

Recommended Posts

I am trying to check if an AABB would intersect with the walls of my level. When I call ForEachEntityInAABBDo the CSG always collides with my AABB because the CSG has no script and it's all collapsed into one giant entity with no children (I think). I could add a blank script to every wall in my level, but wouldn't that be(in addition to tedious work) a significant performance hit?. Anyone have a better way of doing this check?

Link to comment
Share on other sites

The individual brush entity does not exist if its been merged.

I understand. I am not looking to check for the intersection with an individual brush, I want to check if an AABB intersects anything. When calling ForEachEntityInAABBDo, the merged CSG has an AABB that covers the entirety of merged brushes so the AABB I am testing will always intersect the CSG. I am looking for a way to check if an AABB intersects the CSG, not the CSG's AABB.

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