Characters

Usage guide of the character kits: choosing third-person, first-person, top-down or platformer, roster and forms, settings and defaults, character.control and camera services, events, hooks (character.jump, character.respawn, character.action), engines.

Source: module-kits:kits/character_third_person/usage/en.mdView Markdown source

Also read offline — CLI: grip-forge docs characterMCP tool: gripforge_docs { "topic": "character" }

The player character (character.* kits) #

The body the player controls: walking, running, jumping, the camera that follows it, and the contract other kits use to borrow it (vehicles, climbing, attacks, dashes). Readable offline: gripforge docs character, or the MCP tool gripforge_docs (topic character).

What it is for #

A game installs ONE controlled-character kit for its view, and optionally the add-ons. Every controlled-character kit owns the entity tagged player and provides character.control, so interaction, vehicles, scenes, saves and combat work whichever one is installed.

KitWhat it adds
character.third_persona kinematic capsule that walks, runs and jumps from input actions, a spring-arm chase camera, optional free look, shoulder aim for shooters, double jump
character.first_personthe same capsule seen through its eyes: pointer and right stick turn the head, the body faces where the eyes look
character.top_downthe view from above: isometric follow camera, world-relative movement, aim from the pointer, click to move, and a motor other kits use to lock, push or turn the body
character.platformercamera-relative platforming: accelerated movement, variable jump height, coyote time, jump buffering, checkpoint respawn
character.rostergame-defined characters and roles, team selection and locking, ability slots and bounded resources (reuses combat.abilities)
character.formstransformations (small, large, robot...) with a capability profile, collision size, duration and a bounded stack of previous forms; a Rust core

Install what the game needs; gripforge kit api <id> lists every setting of a kit.

Turn it on #

gripforge_gamekit_install   { project_id: "gkp_…", id: "character.third_person" }
gripforge_gamekit_configure { project_id: "gkp_…", id: "character.third_person",
                              config: { "walkSpeed": 4, "runSpeed": 7, "airJumps": 1, "cameraDistance": 6 } }

The controlled-character kits require input.actions, world.ground (the platformer: world.platforms), the host physics (physics.character, physics.port) and game.engine. Controls come from the input kits (see the Controls guide): the actions are move_x / move_y, sprint, jump, crouch (when the game turns crouch on), and look_x / look_y when free look is on.

Settings and defaults #

character.third_person #

KeyDefaultMeaning
walkSpeed / runSpeed4 / 7m/s
jumpImpulse5take-off speed
airJumps / airJumpImpulse0 / 5extra jumps before landing (1: double jump); also usable after walking off an edge
cameraDistance / cameraHeight5 / 2metres
turnSmoothing0.150 snaps, 1 turns very slowly
cameraLookautoorbit: the pointer (captured) and the right stick turn the camera around the character (yaw and pitch), it never recentres, and holding aim turns the body toward the camera; chase: the camera recentres behind the heading and the pointer turns nothing; auto: a game on third_person or fps gets orbit; a scheme that makes the pointer its cursor (moba_click, arpg_click, rts, point_click, top_down) gets chase; any other game (no scheme, or another scheme) gets orbit when input.pointer_lock is installed, otherwise the chase camera as before. freeLook: true is still accepted for orbit
bodyNode""the game's own character body the kit drives instead of its capsule (Godot: CharacterBody3D path or name; Bevy/web: entity id); empty: the kit's capsule. See « The player's body »
invertYfalsepointer or stick up looks down (orbit camera); comfort of the player, not moddable
shoulder0camera offset to the right of the character, metres (0 to 1.5)
aimDistance0with cameraLook: orbit: camera distance while aim is held (0: cameraDistance)
combatDistance / combatSeconds0 / 4camera distance while the player fights (0: off), and how long after the last blow it holds
lookSensitivity / stickLookSpeed / pitchLimit0.0024 / 2.4 / 85free look comfort (radians per pixel, radians per second, degrees)
lockStrafe / lockCameraSpeedtrue / 6movement and camera blend while a combat.ranged target is locked
actionLayers{}animation layers by action family (attack, shoot, reload, block, hit...): mask, weight, fade and how much the movement slows
crouchfalseon: the crouch action held (Shift, gamepad B) crouches and the sprint moves to Caps Lock; off: no crouch, Shift sprints
crouchSpeed / crouchHeight1.8 / 1.2pace while crouched (m/s) and height of the crouched capsule (m)
crouchKeys / sprintKeysShift / Caps Lockkeys of the crouch, and of the sprint while the crouch holds Shift
jumpRunSpeed1speed along the ground at take-off (m/s) from which the running jump plays instead of the standing one
hardLandingSpeed / fallSpeed6 / 7downward speed (m/s) from which a landing is hard, and from which a jump in the air plays fall
landSoftTime / landHardTime0.18 / 0.4seconds each landing holds (a hard landing is cut short when the player moves on)
animFades{}cross-fade into each slot, seconds, over the defaults (see below)

A shooter turns the shoulder aim on together: { "cameraLook": "orbit", "shoulder": 0.6, "aimDistance": 3 }, with combat.ranged aimFromView: true.

<!-- test: kits/character_third_person/tests/character_third_person.rs::the_combat_camera_pulls_back_while_the_player_fights_then_returns --> A melee game pulls the camera back while the player fights, so wind-ups and threats on the sides stay in view: { "cameraDistance": 4.5, "combatDistance": 6.5, "combatSeconds": 4 }. The player fights while a blow it dealt, took or swung is less than combatSeconds old, or while a lock-on of combat.lockon holds; camera.distance follows, and aimDistance still wins while aim is held. Without combatDistance nothing changes.

<!-- test: kits/character_third_person/tests/character_third_person.rs::the_player_stands_up_only_where_there_is_room --> Crouching lowers the capsule and the pace and forbids the jump; let go, the player stands up only when the room over its head is free (under a low ceiling it stays crouched). player.crouched says so, and it is saved.

<!-- test: kits/character_third_person/tests/character_third_person.rs::a_standing_jump_and_a_running_jump_play_their_own_start_loop_and_landing --> The kit chooses the animation slot of the player from its state, and the model's passport (passport.anim.clips) maps each slot to a clip: idle, walk, run, crouch_idle, crouch_walk, jump_standing_start / jump_standing_loop (still at take-off), jump_running_start / jump_running_loop (moving at take-off), fall, land_soft, land_hard (a drop, or a running jump). Each change carries its cross-fade (model.animFade; defaults: idle 0.25, walk and run 0.22, crouch 0.25 / 0.22, jump starts 0.08 / 0.06, jump loops 0.18 / 0.15, fall 0.3, landings 0.06 / 0.05) and the slots to fall back on when the model lacks the clip (model.animFallback: jump_start, jump_loop, jump_land, crouch…), so a model made for the older slots still plays. player.anim is the slot playing. Change a fade with { "animFades": { "land_hard": 0.1 } }.

character.first_person #

walkSpeed 4, runSpeed 7, jumpImpulse 5, eyeHeight 1.62 m, fov 72 degrees, lookSensitivity, stickLookSpeed, pitchLimit 85. The player's own model is not drawn through its eyes; it comes back in a vehicle.

character.top_down #

KeyDefaultMeaning
moveSpeed / acceleration / turnSpeed7 / 60 / 18m/s, m/s squared, rad/s
aimautothe pointer when the host publishes aim.point, else the nearest enemy in front, else the heading
aimAssistRange / aimAssistCone7 / 100metres / degrees
cameraYaw / cameraPitch / cameraDistance45 / 55 / 22degrees, degrees, metres
cameraProjectionperspectiveor orthographic (then cameraViewHeight is the visible world height)
cameraFov, cameraTargetOffset, cameraSmoothing0, [0,0,0], 0.125lens, framed point, follow softness (seconds)
clickArrive / clickReach0.3 / 1.6click to move: stop distance, and reach before attacking or using the clicked entity
clickPath / clickBlocked / clickRepathnavigation / straight / 0.5route with ai.navigation when the game has it, what to do when the point is unreachable, replan delay

character.platformer #

moveSpeed 6.8, acceleration 42, jumpImpulse 9.5, gravity 23, coyoteTime 0.12 s, jumpBuffer 0.14 s, airControl 0.68, jumpCut 0.48 (upward speed kept when the jump key is released early), fallGravity 1.25, cameraDistance 9, cameraHeight 5, capsule radius 0.35 and height 1.8. With world.platforms the kit also keeps the course records and settings of the campaign.

character.roster and character.forms #

character.roster: unique (a character is taken once per game), autoPlayer, maxMembers, title, and the collection roster_characters ({ id, name, slots: [{ id, ability, label, action }] }, up to 12 slots). character.forms: baseForm (default base), changeCooldown 0.5 s, maxDepth 4 (1 to 8) and 1 to 16 forms, each { id, duration, radius, height, speedScale, damageScale, capabilities[] } (duration 0 is permanent; the default set is a base form and a ten-second small form).

Services other kits use #

  • character.control: player(), position(), yaw(), lookYaw() / pitch() (where the camera looks: the aim of a shooter), speed(), detach / attach, teleport, hold(owner). In the Rust player also claim(owner, priority), release(owner, velocity), beginMove(owner), setVelocity(owner, velocity), velocity() so grapples, grinds and boosts can borrow the capsule by priority.
  • camera.third_person, camera.first_person, camera.top_down (the pose the renderer reads) and camera.look (free look: add(dx, dy), yaw(), pitch()).
  • character.motor (top down): lock, push or turn the body for attacks, dashes and staggers.
  • character.platformer: grounded(), velocity(), launch(vy) (a spring), push(dx, dz) (a conveyor).

Events: player.moved (10 Hz while moving: { id, x, y, z, yaw, speed }), player.jumped (aerial is true for an extra jump), player.action (an action started and how it slows the movement), player.pushed. Variables: player.speed, camera.yaw, camera.pitch, camera.shoulder. The character listens to vehicle.entered / vehicle.exited: the capsule is detached while driving and returns beside the door.

Services the character kits consume #

character.third_person and character.first_person need input.actions (required: axis, pressed, justPressed) and world.ground (required): defaultSpawn() → { position: [x, y, z], yaw } places the player at the start, and groundY(x, z) → height puts the feet back on the ground at a scene entry, a spawn or a respawn. Any brick may serve it: a world kit (world.terrain, world.district) or your engine's own terrain (Godot provide_service, Unity Provide, Unreal ProvideService: see the engine interop guide). combat.ranged, combat.melee, combat.health and engine.hooks are optional: used when installed. The full list of each kit is in its API reference (consumes).

Holding a heading (setFacing) #

character.control.setFacing(yaw | null) and facing() (on the web since 1.12.0, in Rust since 1.18.0): the body turns smoothly toward the held heading and moves in side steps. The locomotion state becomes strafe_left, strafe_right or walk_back according to the direction relative to the heading (walk / run when moving forward). These are slots of the model passport, and the player_character slot now declares those clips. null releases the heading. combat.lockon uses it to strafe around a target.

The game's own camera (engineCamera) #

When a game draws through its own camera (an engine scene with its camera: the connection module adopts it instead of the kits' camera), the module calls camera.third_person.engineCamera(yaw) once, when that camera becomes the view (since 1.19.0); from then on the kit reads its yaw in place at each tick from engine.view.yaw(), a service the engine provides: moving forward is moving where the game's camera looks, and the kit neither recentres it nor turns it with the right stick or a lock-on. engineCamera(null) gives the kit its own camera back. The game calls nothing: the module does it.

Hooks and modding #

The names and payloads are the same in every character kit, so one tap works whichever character a game plays.

HookPayloadWhat a tap may do
character.jump{ entity, speed, aerial }change speed (0 to 30), cancel the jump
character.respawn{ entity, x, y, z, reason }change the position, cancel; asked at a scene entry (scene) or on the scene's player instance (instance), not on a load or while driving
character.action{ entity, anim, movement, moveScale }change how an action slows the movement (free, slow, lock, root)
character.pushtop downaccept or change a push
roster.select, roster.lock, roster.close, roster.use, roster.grantrosterpick another character, refuse a lock, cancel the end of selection, swap the ability of a slot, change a granted amount
{ "id": "no_jump_indoors", "hook": "character.jump", "if": [{ "in_zone": "z_house" }], "cancel": true, "reason": "low_ceiling" }

Moddable keys: the speeds, jump values, camera keys and actionLayers. The comfort of the person playing (lookSensitivity, stickLookSpeed, invertY) is not moddable. In game.engine content a scene entry places the player (position and heading), and an instance of kind player is the player.

Engines #

The movement rules are the same Rust implementation on the web and in the native player. character.third_person, character.top_down and character.platformer are also delivered to Godot and Unity as files (a character body with a seed scene and a generated options file) and to Unreal through the shared kit library; character.first_person, character.roster and character.forms run on the web and in the native player. On the engines that do not run the hooks yet, the behaviour is the one without any tap.

When it does not do what you expect #

SymptomCause and fix
The player does not moveno input.actions, or the action is not mapped to the device: check the Controls guide
No double jumpairJumps is 0 (the default); set it to 1
Shift crouches instead of sprintingcrouch is on: the sprint is on Caps Lock; set sprintKeys, or crouch: false
The player stays crouchedsomething is over its head: it stands up once the room is free
The camera keeps recentring, or the mouse does not turn the cameracameraLook is chase, or the control scheme of the game leaves the cursor free; set cameraLook to orbit
A second shooter-style setting does nothingaimDistance only works with cameraLook: orbit; shoulder works without
A form change is refusedthe cooldown is running, the stack is full (maxDepth) or the engine reported the destination blocked

<!-- kit-services:begin -->

Services this kit uses (and that you can provide) #

CapabilityRequiredMethods
combat.healthoptionalalive, health
combat.meleeoptionalmovementScale
combat.rangedoptionaltargetingEnabled, targetingStep
engine.bodiesoptionaldesignateCharacter
engine.hooksoptionalrun
engine.viewoptionalyaw
input.actionsrequiredaxis, justPressed, pressed
world.groundrequireddefaultSpawn, groundY

Any brick can serve them: a kit, or your engine (Godot provide_service, Unity Provide, Unreal ProvideService, Bevy provide_kit_service, C gfk_provide) — see the guide. <!-- kit-services:end -->