HammeriteNavigationBuilder

Navigation. Inherits RefCounted

Derives the walkable ground of a compiled map.

There is no painting step and no voxelisation. In a subtractive world the compiler has already answered the question a navigation baker normally spends all its effort on: it knows where the air is, it has cut each room's surfaces into convex pieces, and it has punched the doorways out of them. What is left is to pick the pieces you could stand on and measure them. Which way is up. An air brush's face normals point OUT of the room, so a room's FLOOR is the boundary wall whose normal points DOWN - into the rock beneath. The genuinely upward-facing surfaces in a room are the tops of detail brushwork standing in it (a crate, a ledge), which are not part of the cell boundary at all. Two sources, opposite tests; easy to get backwards. Obstructions are not subtracted, they are measured. There is no pass that removes the footprints of things standing in the way. Instead every patch of ground carries the free height above it, and something standing on the floor is simply ground with no headroom. That falls out the same computation, and it gets right the case a footprint subtraction gets wrong: a chandelier must not block the floor beneath it. The ground IS cut where the free height above it changes, though - by a ceiling that drops, or by the underside of something hanging over part of it - because one patch carries one headroom, and a number that describes only the middle of a patch is a number an agent profile cannot safely filter on.

Properties

TypeNameDefault
floatstep_height18.0
String[]warnings[]
HammeriteCompileProgressprogressnull

Methods

ReturnsMethod
HammeriteNavigationSurface[]build_surfaces(map: HammeriteMap)
AABB[]obstruction_bounds(map: HammeriteMap) static

Enumerations

enum PropRole

ValueNameDescription
0IGNOREInvisible to navigation. The default, and right for most dressing.
1OBSTACLETakes the ground it stands on, and lowers the headroom above it.
2WALKABLE_TOPIts top is somewhere to stand: a platform, a bridge.
3BOTHBoth - a crate you can climb onto.

Constants

MAX_WALKABLE_SLOPE_DEGREES

const MAX_WALKABLE_SLOPE_DEGREES = 46.0

Ground steeper than this is a wall, not a floor.

NAV_ROLE_KEY

const NAV_ROLE_KEY = &"nav_role"

HammeriteEntity property naming what a prop does to navigation. Props are meshes, and a mesh is only triangles - nothing here can tell a table you walk on from a statue you walk round from a banner you walk through. HammeriteBrush geometry is semantic and needs no marking; props are not and do. The value is a PropRole, or its name in lower case ("ignore", "obstacle", "walkable_top", "both") as a map file and the inspector write it. Anything else is PropRole.IGNORE.

Property descriptions

step_height

var step_height: float = 18.0

The tallest rise walked as a step, which is how far a floor goes on up a flight of stairs. Set from HammeriteNavigationAgentProfiles.step_height by the runtime.

warnings

var warnings: String[] = []

What the last build could not do. An unmarked prop is inert to navigation, which is the cost of marking being explicit, so the build says how many there were rather than leaving it to be discovered by an agent walking through a statue.

progress

var progress: HammeriteCompileProgress = null

Told how far build_surfaces() has got, when it runs as part of a compile. It stops early once this says it was cancelled.

Method descriptions

build_surfaces()

func build_surfaces(map: HammeriteMap) -> HammeriteNavigationSurface[]

Every patch of ground in map an agent could conceivably stand on, measured.

obstruction_bounds()

static func obstruction_bounds(map: HammeriteMap) -> AABB[]

Everything standing in the rooms, as bounds in the map's space. Exposed because measuring the ground is not the only thing that has to know about a crate: HammeriteNavigationLinkBuilder asks whether the air between two ledges is really empty, and the crate that divided the floor into those two patches in the first place is exactly what would otherwise be jumped straight through. Warnings are dropped here - the caller that BUILT the ground has already reported them, and saying it twice per bake helps nobody.

Hammerite 1.0 · built from a6dd634, 2026-10-10