Skip to content

@relu-interactives/spatial-ecs


@relu-interactives/spatial-ecs / index / heightfieldColliderDesc

Function: heightfieldColliderDesc() ​

ts
function heightfieldColliderDesc(
   rapier, 
   field, 
   anchor): ColliderDesc;

Defined in: terrain/TerrainSystem.ts:540

Rapier's heightfield: (rows + 1) x (cols + 1) heights in column-major order, rows along Z and columns along X, centred on the collider and spanning scale metres. World scale is folded in.

Parameters ​

ParameterType
rapier__module
fieldHeightfield
anchorObject3D

Returns ​

ColliderDesc