Log inGet started
World

High Ground: Climbing, Ledges, Vaults and Rooftop Running Kit

Branchmain
Branchesmain
Commite1311f0fc8

README.md

traversalKit.rules

Climbable by rule, so a town or a mountain with sensible colliders just works with no tagging. traversalKit registers this test with climbKit (ledge.addClimbRule); it decides only for surfaces nobody marked (a climbable attribute or a ClimbSurface always wins).

A surface climbs when:

  1. it is not a moving body (characters, dynamic or kinematic physics) and not smooth (glass, ice, metal, polished, chrome, plastic, lacquer, water, by material or entity name);
  2. it is steep enough: at least the assist's ruleSteepness degrees from horizontal;
  3. it is tall enough: the face stands at least ruleMinHeight above the ground under it (shorter ones are mantled and vaulted instead);
  4. it gives a hold: a known hold kind by its material or name (stone, brick, ashlar, wood, timber, plank, bark, rock, cliff, granite, bamboo, rope, ladder, …) or terrain (cliff); or an unknown material at least ruleRoughness rough and no taller than ruleMaxHeight.

Usable edges (ledges, wall tops, eaves) are always grabbable and mantled by climbKit whatever the rule says.

local Rules = require("traversalKit.rules")
print(Rules.explain(wall.id, hit).reason)   -- "stone by material", "too shallow (40 deg < 68)", ...

install(assist), uninstall(), explain(entityId, hit), active(), RULE_NAME.