Jump to content
  • Advertisement
Sign in to follow this  
nutz

How does it really happen ? (Collison question)

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

If you intended to correct an error in the post then please contact us.

Recommended Posts

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
Advertisement
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
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
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
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
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!