Sign in to follow this  
maya18222

Quad tree with non convex collision data

Recommended Posts

Im wondering how to go about the following problem. If I have a quad tree with simple collison geometry as shown below. ie a world with just spheres. Image and video hosting by TinyPic Then checking for collision seems simple. Just travers the quad tree, and do sphere collision tests agains the spheres. But what happens when you have a world like the following? Where the black lines show a number of rooms connected via corridors. Image and video hosting by TinyPic Its not a convex shape. And the player should be allowed to enter the building and should collide with all the walls, floor and and ceiling. The solutions I have come up with are: 1) Treat each wall as an AABB. 2) Somehow switch to BSP collision checking when entering the building, and back to other collision checking when leaving the building.

Share this post


Link to post
Share on other sites
I think, that AABB approach is good solution in that case. And cou can use Quad tree to determine which objects check for collision like with speheres. If object occurs in different quads, pointer to its AABB appear in both nodes.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this