XNA Creators Club Online
Page 1 of 1 (3 items)
Sort Posts: Previous Next

New idea for collision detection

Last post 05-11-2008 1:00 PM by Matthew Knowles. 2 replies.
  • 05-11-2008 10:21 AM

    New idea for collision detection

        Hey all,

    so this is just my guess on how collision detection should work:
    1) you have a few boxes created around the player(1 for the body, 1 for each arm, 1 for the head, etc) and check those collisions off the same model collision type of the world, making an extensive collision detection world along with the actual geometry.

    2)OR you make a mesh that fits around the more complex models(such as the character) and check it's collision with the world's collision mad with the last method.

    am I right? and if not, can someone PLEASE send me in the right direction?
    thx ahead of time,
    -chris
  • 05-11-2008 11:28 AM In reply to

    Re: New idea for collision detection

    The first idea isn't all that new, but it is definitely the right direction. Something else you might want to try is putting it all in one big bounding box, checking collision with the world. Then you save those polygons the big box collided with and now you only have a few polygons to check all the smaller boxes against.
    Regards,
    Louis Ingenthron
    Fortis Venaliter
    Developer of Unsigned
  • 05-11-2008 1:00 PM In reply to

    Re: New idea for collision detection

    Both of those are common methods used, although it doesn't neccisarily need to be boxes used in method one.  We usually use a number of spheres or sausages to represent a character although it depends what model you're building as to what shapes you use.  Its the way physics systems work.  They usually have a number of predefined that you piece together to build up a representation of your world and the things in it.  You might use a sphere for the head, sausages for the body, arms and legs

    I've also used method 2 at work, using lower resolution collision meshes for characters.  These are usually just normal character models that have been polychopped to get them to a more workable size for collision.  If you use a AABB or OOBB to preform the initial intersection test for characters to rule out most collisions quickly, you can then use the low resolution collision meshes for poly-poly collision to check for actual intersections between the characters.  It also works well for other cases such as ray-poly checks against characters for seeing if they were hit by projectiles, etc.
Page 1 of 1 (3 items) Previous Next