Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How is collision detection and movement typically handled in a FPS, particularly handling slight changes in ground height such as stairs (both on incline and decline)?

share|improve this question
up vote 12 down vote accepted

Entities typically represented by a capsule (cylinder with spheres on the ends) against world geometry (or a simplified collision mesh) for world-ent collision.

Stairs are usually either no-collide with an invisible ramp, or below a certain height you usually get a lift up as a side effect of collision resolution. (you'll get interpenetration with movement as a part of step size, and resolution will pop it out upward as the closest plane)

I think this is how Unreal 3 works, but I could be wrong. I recall seeing a bounding box hierarchy in Source, but I can't remember if that was just for combat. regardless, capsules are simple and fast

share|improve this answer

In Unity 3D, the easiest way is to have the first person controller. Usually the character has to jump up if the step height is higher than the step offset. But another way to do it is add a box collider and rotate it so that the character can skim the stairs easily, as if it were a ramp.

share|improve this answer

Brady's answer is good, but if you want a hacky way to do it, you can just cast a ray down to your grounds collision geometry, figure out what triangle it hits, and then use a weighted average of the height of the verts of triangle to figure out the ground height.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.