Mapping/Ladders and Stairs
What follows is a technical description of how the pathfinding code deals with stairs and other vertical obstacles. Most mappers will not need to know the full details. If you want the player to go up stairs or over other obstacles, it's a good rule of thumb to keep the vertical change around 8 units (the height of an average stair). If you're using a non-standard height or want to implement something other than normal stairs, you may need to read the following.
New Ladder and Stair Directions
With 2.3, a new tracing system is being implemented to provide better realism in regards to solid surfaces. This change has brought about a change in how stepup is handled.
No More StepUp Brush
Spacing permitted between steps
Note that the green bars mark the third trace, which must be to a reasonable floor or the gap is too far and the actor can possibly fall.
Maximum Actor Rise
It does not look pretty, but it is functional. Refer to the actor clip image below for ideas to make stairs look nice.
Required Actor Bounds With Legroom
1. The 4x4 space must not be obstructed up to PATHFINDING_MIN_STEPUP tall (currently 8 model units) for actor leg room, and 2. The 22x22 wide space on top of the above volume up to the ceiling for the actor's torso, arms, and head. This unfortunately means that if we place our steps too tall and too close together, the floor trace will not let us stand on the spot because the actor's body does not fit. The three choices are to increase MIN_STEPUP, increase WALL_SIZE (the thickness a wall may enter a cell without causing it to become obstructed), or space out the steps a bit. Currently, the magic ratio is (11-2)/8, or roughly 9 units horizontally per 8 units vertically (about 45 degrees).
Note the black step with the yellow bar. The yellow bar is inside the actor's bounds box, so this cell can not be occupied by an actor. Shrink the black step by one model unit, however, and that step is legal.
In order to walk upright from one cell to another, we need an opening height of 44 mapunits (24 for crouching). In general, the opening height is calculated as the delta between the higher floor and the lower ceiling of the two cells. In a typical indoor stairway situation we take the delta between the ceiling of the lower cell and the floor at the border between the two cells.
Keep in mind that those measures are taken with a 4x4 trace. Moving the whole staircase a tad sideways can sometimes have a large effect on the heights measured.