Hi everyone, I'm working on a fps/rpg title, and having a bit of trouble coming up with a set of rules or a combo of methods or tests to determine if there is a steep rise in the height map in front of the player, NPCs, and monsters. the idea is, when checking for collisions, after calculating the unit's new position, if there is a "steep rise ahead" (like a wall or cliff) they stop. at first i was using the usual "well if its less than x feet high they can just step up, otherwise its a wall type collision". but that doesn't quite get the desired effect.
the desired effect is this: if its something they can easily surmount (say 3 foot high for a person), go ahead and move them. if the slope is not too steep (say 60 degree incline) go ahead and move them, otherwise, they must enter "climb mode" which allows them to scale sheer cliffs etc (imagine a VR rock climbing simulator).
climb mode works great, its the checking of the conditions for "steep rise ahead" (IE a climbable surface) that's being elusive.
the slope check is trivial: delta y / movespeed > 1.3 rads => its too steep, must use climb mode.
its the "easily surmounted" part that's tricky. the base walking moverate for a person is 0.3333 d3d units per frame. doing an altitude or slope check at a range of 1 unit or something like the creature's bounding box radius alone doesn't work. while a person may be able to clamber over a three foot rise in 6 inches of forward travel, the single check alone doesn't tell you if that's the top of the rise, and therefore truly a 3 foot obstacle,or merely the bottom 3 feet of a 100 foot cliff. i guess two checks are called for perhaps? one at one foot ahead and one at 2 feet ahead. if the slope to 1 foot ahead is "steep" and the slope from one to two foot ahead is not, then the altitude at 1 foot is the top of the rise (or close enough to it for government work).
most games i've seen simply limit forward travel based on the slope alone, leading to things like trucks that can drive up walls (EVO 4x4 2.0), or being able to walk across the face of a sheer cliff (Oblivion).