Original Post
Assuming that you are making a 2d platformer with 3d elements, how would you handle collision with the 3d elements? I'm thinking that for the main character on a normal 2d element of the landscape I will simply use line swept circle tests against the lines of the 2D polygons, but I'm a little stumped when it comes to how to integrate 3d objects, especially when they may be animated. Assume, if you will, that we have a ball on a chain that swings round in 3D, but we want the player to be able to jump around on the top of the 2d projection of the ball, and be damaged if they hit the side or underneath. I'm wondering if it would be best to code a system to deal with arbitrary 3d objects, or if it would be best to do something like having an editor to simplify the geometry into blocks, bearing in mind we want player movement to be smooth and not stuttered by every tiny bit of geometry that might be in the way, such as the chain part of the ball and chain. This might be quite straightforward with static objects, but another level of complexity is added with objects like the ball and chain that move around, the simplified geometry must know how to animate in the same manner as their parent. Perhaps the best approach is a plugin for your 3d modeller of choice, or an in game editor that allows you to specify what parts of the geometry are to be treated as platforms, damage dealing entities and geometry that should not affect the player... I suppose in that way we know the geometry will animate correctly, we can model a platform into the ball and set it as a platform and we can make the ball itself a damage dealing object... then I suppose we just use the line swept circle test to check for collision. So how would you approach this problem? Do you have any better ideas? Cheers, Steve