Traversal & navigation

Ramp, Stair & Terrain Slope Calculator

Direct answer

Slope angle is the arctangent of rise divided by horizontal run; grade is the same ratio expressed as a percentage. A ramp rising 3 m over 6 m has a 26.57-degree angle, 50% grade and 6.71 m surface length. Stair count then comes from dividing total rise by the target riser height.

m
m
cm
cm
deg

Result

Slope angle
deg
Grade
%
Ramp surface length
m
Against entered navmesh slope
Number of stair risers
Actual riser height
cm
Horizontal stair run
m
2 risers + tread
cm

Method & assumptions

How this is worked out

The ramp uses angle = atan(rise / run), grade = rise / run x 100 and Pythagoras for surface length.

Stair count rounds rise / target riser upward so no riser exceeds the target. Actual riser height divides the total rise evenly across that integer count; stair run multiplies tread depth by the number of treads.

The navmesh result compares geometric slope to the entered agent limit only. Collision, voxel size, step height, animation, acceleration and controller rules can still make a nominally walkable surface fail in engine.

Reading a slope in game terms

AngleGradeTypical reading
0–5 deg0–9%Nearly flat
5–15 deg9–27%Comfortable traversal
15–30 deg27–58%Visibly steep
30–45 deg58–100%Climb-like; controller dependent
Above 45 degAbove 100%Usually blocked or special traversal

These are level-design readings, not building-code compliance. Real public stairs and ramps require jurisdiction-specific professional design.

Questions

How do I convert slope percentage to degrees?

Take the arctangent of grade divided by 100. A 50% grade is about 26.57 degrees; a 100% grade is 45 degrees. Percentage and degrees are not interchangeable.

How many stair steps do I need?

Divide total rise by your maximum desired riser height and round upward. Then divide the rise evenly by that count so every step has exactly the same height.

Does a slope below Agent Max Slope always generate navmesh?

No. It passes only the angle test. Agent radius, step height, voxel resolution, collision geometry and small disconnected regions can still prevent usable navigation.

Sources and assumptions

Sources define the engine settings or mathematical model. Project-specific performance and final playability still need measurement in the target build.