Sign in to follow this  
nutz

How does it really happen ? (Collison question)

Recommended Posts

nutz    138
What is the perfect way for collision of a player with other objects in an FPS game ? Is the player body made up of small meshes , joined together, and then collision is checked against the AABBs ? Or is there more to it ? I would be grateful if someone could direct me to useful information/explain me how this happens (FPS collision stuff) ?

Share this post


Link to post
Share on other sites
oliii    2196
you don't need to be super accurate when doing player-player or player/objects collisions (exept if you want to check a rocket more accurately). Games use a single AABB for each player and collide the players like that.

You can do limb collisions if you want too, but unnecessary. There are no perfect ways.

for fast moving objects, and rather singular objects (bullets, grenades, rockets), you can model them as a single particle, and essentially do a ray/player mesh collision. a moving box against a mesh is quite costly, so if you can approximate the object to a point the better.

Share this post


Link to post
Share on other sites
nutz    138
Thanks, but wouldn't using a single AABB for a player make it unstable i.e it would trip easily and climbing stairs and stuff would be difficult ?

Share this post


Link to post
Share on other sites
oliii    2196
yes, you have to fudge it. Use some kind of step-up algorithm, which would check if the player can be placed, say, 30 cm above where it should be.

related docs,

http://www.gamasutra.com/features/20010324/melax_01.htm

http://www.fluidstudios.com/pub/FluidStudios/CollisionDetection/Fluid_Studios_Generic_Collision_Detection_for_Games_Using_Ellipsoids.pdf

the second one involves two passes, once without gravity, the other adding gravity. Also, note that it's using ellipsoids, so more forgiving when you encounter a step.

Share this post


Link to post
Share on other sites
CJM    454
I remember from somewhere that most games use [nonrotated] capsule shapes for player collision detection. This means that they can step up steps and they can rotate around without getting stuck in walls. Similarly, you don't get stuck to other players if you're all capsules and you can just use distance measurements between centres of the players to determine if you're gonna need to go to sphere collision.

Hope this helps;

//end rant
CJM

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