Using 2d collision with 3d objects

Posted by Lyise on Game Development See other posts from Game Development or by Lyise
Published on 2012-07-02T11:35:45Z Indexed on 2012/07/02 15:24 UTC
Read the original article Hit count: 188

Filed under:
|
|

I'm planning to write a fairly basic scrolling shoot 'em up, however, I have run into a query with regards to checking for collision. I plan to have a fixed top down view, where the player and enemies are all 3d objects on a fixed plane, and when the enemy or player fires at the other, their shots will also be along this fixed plane.

In order to handle the collision, I have read up a bit on collision detection in 3d, as it is not something I have looked into previously, but I'm not sure what would be ideal for this situation. My options appear to be:

  • Sphere collision, however, this lacks the pixel precision I would like
  • Detection using all vertexes and planes of each object, but this seems overly convoluted for a fixed plane of play
  • Rendering the play screen in black and white (where white is an object, black is empty space), once for enemies and once for the player, and checking for collisions that way (if a pixel is white on both, there is a collision)

Which of these would be the best approach, or is there another option that I am missing?

I have done this previously using 2d sprites, however I can't use the same thinking here as I don't have the image to refer to.

© Game Development or respective owner

Related posts about XNA

Related posts about 2d