HammeriteNavigationLinkData

Navigation. Inherits RefCounted

A way from one patch of ground to another that is not walking: a window climbed through, a ledge dropped off, a gap jumped, a ladder someone placed.

A step is not a decision. The smallest of these, Kind.STEP, exists because everything that is not coplanar has to be joined somehow, and a stair tread is not a feat of athletics. It is measured like the rest and costs nothing to take, so a flight of stairs prices like the walking it is.

Ordinary doorways are not links. Two rooms that abut share a wall the compiler punches an opening in, and their floors come out coplanar and edge-coincident, so the navigation server joins the two regions itself and an agent walks across for free. What needs a link is a HEIGHT DISCONTINUITY - the ground on one side is not the ground on the other, and no amount of walking crosses it.

This says what the geometry is, not who can use it. A link carries what it costs to take: how high you must haul yourself, how far you travel through the air, how much you fall, how wide and tall the way through is. Whether a guard can climb a 96-unit sill, or whether the drop beyond it would kill them, is a question about guards, and it is answered game-side by comparing an agent profile against these numbers. Hammerite measures; the game decides.

Properties

TypeNameDefault
floatclimb
Vector3end
Vector2ifrom_room
floatheight
intkind
Stringlink_name
floatlow_water_depth
boolone_way
Vector3iportal_key
floatreverse_climb
floatspan
Vector3start
Vector2ito_room
floatwidth

Methods

ReturnsMethod
floatclimb_towards(reversed: bool) const
floatfall() const
floatfall_towards(reversed: bool) const
boolhas_portal() const
Stringkind_name() const
floatlength() const
Stringname_of_kind(which: int) static
Vector3ino_portal() static
floatrise() const

Enumerations

enum Kind

ValueNameDescription
0WINDOWThrough an aperture whose sill stands above the floor: a window, a hatch, a low wall.
1DROPOff the edge of a patch of ground onto lower ground beneath it.
2JUMPAcross clear air to ground on the far side of a gap.
3AUTHOREDPlaced by hand, for the routes geometry cannot show: a ladder, a rope, a lift.
4STEPUp or down by less than a stride: a stair tread, a kerb. Walking, not a decision.

Property descriptions

climb

var climb: float

Height that must be surmounted going start to end: the sill of a window above the floor it is climbed from, the lip of a ledge being climbed onto. Zero when the way out is level or downhill - walking off a ledge costs no climb at all.

end

var end: Vector3

Where it ends, on the ground.

from_room

var from_room: Vector2i

The room (HammeriteCell.key()) at start. A room, not a NavigationRegion3D: a room has one of those per set of agents that use its ground alike.

height

var height: float

Free height of the way through, in world units. A window 40 units tall is a route for something small whatever else is true of it.

kind

var kind: int

Which kind of discontinuity this is.

var link_name: String

The author's name for this link, or "" if it has none.

A named link can be switched on and off at runtime - a window that is boarded up until the boards come off, a drawbridge. Derived links take the name of the opening they pass through (HammeritePortal.get_portal_name()), which is the SAME name the acoustics use for it, so a window is named once and both systems mean the same window.

low_water_depth

var low_water_depth: float

How deep the water stands over the ground at the lower end - a drop into a pool - in world units. Zero on dry ground. An agent that swims there is at the surface, not on the bottom: it drops in only as far as the water and climbs out only from it (HammeriteNavigationAgentProfile.can_take()).

one_way

var one_way: bool

Taken only from start to end, whatever an agent can climb: a chute, a hatch that opens one way. An authored link says so (HammeriteNavigationLinkBuilder.one_way_key()).

portal_key

var portal_key: Vector3i

The opening this link passes through (HammeritePortal.key()), or no_portal() when it crosses open air.

reverse_climb

var reverse_climb: float

The same, in the other direction. The two differ whenever the ground is at different heights on the two sides, which is exactly when a link exists at all - so a window a guard can climb INTO a cellar may be one they cannot climb back out of.

span

var span: float

Horizontal distance of OPEN AIR the route crosses, in world units: the width of a jumped gap, the overhang of a ledge. Zero for a window, which crosses a wall rather than a gap - two rooms that abut share one plane, and the opening in it has no thickness.

Distinct from length(), the distance between the two endpoints, which also includes the standing-back at either end. The span is what an agent has to be able to clear.

start

var start: Vector3

Where the traversal begins, on the ground.

to_room

var to_room: Vector2i

The room at end.

width

var width: float

Narrowest horizontal dimension of the way through, in world units. INF where nothing constrains it, which is the honest answer for a drop into an open room.

Method descriptions

climb_towards()

func climb_towards(reversed: bool) -> float

What must be climbed to take this link in the given direction.

fall()

func fall() -> float

Height lost going start to end, and zero if the route goes up. This is the number a game compares against what a fall costs an agent.

fall_towards()

func fall_towards(reversed: bool) -> float

How far the route falls in the given direction, and zero if it goes up.

has_portal()

func has_portal() -> bool

Does this link pass through an authored opening?

kind_name()

func kind_name() -> String

Lower-case name of kind, for messages and node names.

length()

func length() -> float

Straight-line length of the traversal.

name_of_kind()

static func name_of_kind(which: int) -> String

Lower-case name of any Kind, so callers counting links by kind do not need one of each to ask what it is called.

no_portal()

static func no_portal() -> Vector3i

No opening: this link crosses open air rather than passing through an aperture. Not a valid HammeritePortal.key(), whose components are brush ids and are never negative.

rise()

func rise() -> float

Height gained going start to end. Negative for a drop.

Hammerite 2.0 · built from 6d57ab2d, 2026-10-17