# Collision Detection Problems

This topic is 3590 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

Hey guys Ok, so I'm working on a maze game featuring a ball that you move around the maze by tilting the maze (2D, but using 3D graphics). I have worked out how to move the entire maze and assign bounding boxes to each wall of the maze, however, I just realised that the collision detection method I'm currently using won't work dynamically. As the maze rotates around, the position of the world will be different and hence the algorithm needs to check the ball position against the new position of the wall. Hope that made some kind of sense. Anyway, I was just wondering how to go about this. I've been pretty stuck on this as most of the articles/tutorials I've seen refer to AABBs and things like that. Any help is appreciated. Ray

##### Share on other sites
If I understood correctly, you've got AABB boxes to represent the collision geometry for the walls, and a sphere to represent the collision geometry for the ball.
You're correct that you need to transform the collision geometry accordingly whenever you transform the render geometry, but there isn't any kind of magic to this. When you apply a 3D transform to an AABB, it just becomes an arbitrary OBB and you do your collision tests using a sphere/OBB intersection test.

I believe RTR Object/Object Intersection Page is the standard source for reading into different kinds of intersection tests.

##### Share on other sites
I'm not sure if it's optimal, but an alternative is to rotate the everything back to AABBs temporarily, and rotate the ball the same, and do collision tests in this space.

##### Share on other sites
So uh, if it's a 2d tile kind of maze, why are you even worrying about this? Do 2d collisions, circles against wall segments.

Also, unless you're rotating different parts of the maze differently, you can just work in the non-rotated space for collisions.

1. 1
Rutin
44
2. 2
3. 3
4. 4
5. 5

• 11
• 9
• 12
• 10
• 13
• ### Forum Statistics

• Total Topics
632984
• Total Posts
3009712
• ### Who's Online (See full list)

There are no registered users currently online

×