Characters and the player
Skill ferret-character · download all skills · SKILL.md
When to use#
A walking player or NPC body, jump and slope tuning, camera modes.
The model#
spawnCharacter(world, id, position) returns an entity with CharacterMovement: a capsule moving against static geometry, with walk, run, crouch, jump, steps, slopes, acceleration. CharacterParams follow UE's Character Movement Component, in metres and seconds. PlayerController turns input actions into movement and camera, reading the action names you give (PlayerActions) and ignoring the ones you leave out. CameraRig is first or third person, switchable at run time, with spring-arm collision.
Steps#
spawnCharacter, thenentity.add(PlayerController, { camera: { view: 'first' } }).- Tune with
CharacterParams, or per level through the manifest'smovementblock. - Hook events:
character:jump,character:land. - Level movement values override Ferret's defaults for that level only.
Check afterwards#
Walk a slope, a step and a gap in a grey-box level; land and jump events fire; the camera does not clip through walls.
What usually goes wrong#
- Solid meshes not marked
checkCollisions(or notcollidein the manifest): the capsule falls through. - Gravity changed by the physics gravity capability: the character reads the field only while it is on (see
ferret-physics-gravity-media). - Unit mistakes: values are metres and seconds, not centimetres as in the UE editor.
Files#
reference/packages.md— Characters, animation graphs, NPC navigation, interactables, zones and transformations.reference/api-character.md— every export of@ferret/characterwith signature and doc comment