# AnimDebug
A component that shows a screen panel with its entity's character controller speed, whether it is grounded, and what its animation body is posing.
# CharacterController
> In a world that installs the Controllers library (`world.installLibrary({ world = "034d26cf-dc3d-4123-abad-3944f97c6a60", as = "controllers" })`), every package name on this page is written with `@controllers::` in front of it, and `asset.list("component")` lists each one under that name.
Kinematic mover. Integrates velocity against gravity, walls, ceilings and
ground, and writes the result to the entity's position every frame.
It is the body's mover: its `.metadata` carries the `bodyMover` tag, which the
velocity verbs (`Physics.setVelocity`, `Physics.addVelocity`,
`Physics.getVelocity`, `Physics.moverOf`), the avatar on the body and a headset
reach it by. A movement component of your own (a vehicle, a hovercraft, a
jetpack) that carries the same tag takes its place on the body, or moves it in
turn with this one: of several movers on one body the enabled one moves it.
The physics guide's "Movers" section (`man topics/physics`) has the contract.
## Driving it
The character moves on a public input bus: `inputX`, `inputZ`,
`inputJump` and `inputJumpHeld`. Each frame the controller reads the bus, moves on what it found,
and then refills it for the next frame.
**Only the local player's body answers the player's controls.** The character
the local player is bound to (`layers.active.players.localPlayer.avatar`)
refills its bus from the `move` axis and the `sprint` / `jump` actions of its
input map, so the map drives it whenever nothing else does. Every other
character holds no map and refills its bus with no movement: an NPC, a
mannequin, a preview or another player's body stands where it is until
something writes its bus. The player's spawn binds the body for you; to hand
the controls to a character you made, bind it:
```luau
layers.active.players.localPlayer.avatar = entity(bodyId)
```
The character takes the map up on the frame after the bind and gives it back
when the binding moves to another body.
Anything else takes the character over by writing those three fields from its
own `update()` — an AI brain, a networked peer, a replay, or gameplay code
that wants the character committed during an attack. The write works from
**any** `executionOrder`, because the refill happens after the read: whatever
is in the bus when the controller next reads it is what the character does.
On the local player's body the controller fills the bus from the map once
more just before the read, so a press moves the body on the frame it
arrives, and that fill takes only the fields nothing has written since the
last refill. A write counts whatever value it carries
(`ref:fieldWrites(name)`), so a writer that holds the body still by writing
no movement and the jump let go keeps it still through every press.
- A writer ahead of the controller (`executionOrder` below `-100`) is acted on
the same frame.
- A writer behind it is acted on the next frame.
- A writer that writes some of the fields leaves the others to the map: one
that steers with `inputX` / `inputZ` alone leaves the jump to the player's
jump control, which jumps on the frame it is pressed.
- Stop writing, and the character stops one frame later; on the local
player's body the map has it back instead.
- Pausing gameplay empties the bus, so a character frozen mid-stride stands
where it was paused and a writer that had it committed says so again.
`inputX` / `inputZ` are a world-space velocity in units per second, the walk
the character is asked for: the controller takes its walk toward them at its
`acceleration` and `braking` (see "Movement feel" below), so scale them
yourself rather than expecting `moveSpeed` to. `inputJump` asks for one jump
and the next update consumes it. `inputJumpHeld` says the jump control is
held: write it `true` on every frame the jump is held, and a jump asked for
with it is cut short when it stops (with `minJumpHeight` above 0), on the
step it takes off when it stopped while the request waited in the
`jumpBuffer`; a jump asked for without it rises its full height.
A component that walks the character due north, whatever the input map says:
```lua
-- Northbound.component/init.luau
declare { executionOrder = 50 } -- anywhere works; 50 runs after the controller
public = {
speed = Field.number(4.0, Sync),
}
function update(_dt: number)
local cc = public.entity.component.get("CharacterController")
if cc == nil then return end
cc.inputX = 0
cc.inputZ = -public.speed
end
```
`WASDInput` is the same pattern shipped as a component: it reads an input map
of its own and writes the bus of whatever component `targetComponent` names,
which is how a mover that reads no controls of its own gets driven. On a
CharacterController — which reads `move`, `sprint` and `jump` from its own
`inputMap` — a WASDInput writes the bus every frame at its own `speed`, and
that is the speed the character walks at. `CharacterController.install` adds
one when `input = true` asks for it.
## The control scheme
`inputMap` is the scheme the character answers to. It reads three controls from it, each on its own:
- `move` — an axis2, projected against the active viewport camera so "forward" is into the screen. The camera turns for the frame in its look phase, before the controller reads it, so a look that turns the camera turns the walk on the same frame.
- `sprint` — held, multiplies `moveSpeed` by `sprintMultiplier`.
- `jump` — pressed, asks for one jump.
A map declaring only some of the three drives the character with those: a scheme with no `sprint` holds one gait, a scheme with no `jump` stays on the ground. The character logs which controls the map left out and names the map, so a game with three verbs ships a three-control scheme. A field naming no map leaves the character answering nothing, and logs that too.
**Repointing it on a live character takes on the next frame.** The map the character was holding is stood down — its controls leave the live set and its touch buttons leave the screen — and the map named here is taken up in its place:
```luau
entity(bodyId).component.get("CharacterController").inputMap = asset.resolve("mygame.input.run", "inputMap")
```
Assigning the map the character already holds changes nothing, so re-stating the scheme leaves the live set where it is. While gameplay is paused the character holds no map at all (the editor's camera has the controls), and it takes whatever `inputMap` names when play resumes. A character that is not the local player's body holds no map either, and takes whatever `inputMap` names when it is bound as that body.
## Movement feel
How the character starts, stops, turns, jumps and falls is set by its feel
fields. The same settings drive the package's character module
(`CharacterController.attach` / `Velocity.resolve`), through one set of rules
(`movement.feel` of `characterController.module`).
On the ground:
- `acceleration` (m/s², default 20) is how fast the walk speeds up toward the
walk asked for. At 20 a 2.5 m/s walk is reached in 0.125 s and a 7 m/s
sprint in 0.35 s.
- `braking` (m/s², default 30) is how fast it slows: to a stop when nothing is
asked, down to a slower walk, and away from a heading the request turned
from. A turn sheds the old heading at `braking` while it builds the new one
at `acceleration`, and a reversal at speed brakes to a stop before it speeds
up the other way, rather than flipping in a frame.
- Either at 0 reaches the walk asked for on the frame it is asked, which is
how the `instant` preset keeps a character that answers with no ramp.
- The walk is the character's own, on top of what carries it: on a belt or a
moving deck it speeds up relative to the surface; on a slope it follows the
ground. `velocityX` / `velocityZ` read the ramp as it happens, so
`Locomotion` blends its gait from the speed the body really moves at, and a
networked peer sees the motion the owner simulated.
The jump:
- `jumpHeight` (m) and `jumpApexTime` (s) state a jump directly: with both, a
full jump rises exactly `jumpHeight` and tops out `jumpApexTime` after
take-off, at any frame rate. `jumpHeight` alone rises that high against the
character's gravity; `jumpApexTime` alone takes off at `jumpForce` and tops
out that long after. At 0 (the default) a jump takes off at `jumpForce` m/s
against the character's gravity.
- `minJumpHeight` (m) above 0 makes the jump control's release cut the jump
short. Let go at take-off, it rises `minJumpHeight`; let go during the rise,
it rises `minJumpHeight` above where it was when let go; held to the top, it
rises the full height. A real tap holds the control a few frames, and a fast
jump has risen some way by then: a `minJumpHeight` of 0.8 m on a jump taking
off at 8.3 m/s gives a 0.05 s tap a hop near 1.3 m. Set `minJumpHeight`
below the hop a tap should give; the presets set it so. On the local player's body the input
map's `jump` control holds it (keyboard, gamepad and touch alike); a writer
of the bus holds it with `inputJumpHeld`, and the module with
`CharacterController.jump(id)` until `CharacterController.releaseJump(id)`.
- `fallGravityMultiplier` (default 1) scales gravity while the character falls,
from the top of a jump or off a ledge: above 1 a jump rises floaty and comes
down fast, below 1 it drifts down.
- `maxFallSpeed` (m/s) above 0 caps the fall.
- One request is one jump. `inputJump = true` (or one press of `jump`) spends
one jump, and `jumpCount` counts it. A character with `maxJumps = 2` jumps
once on the request and keeps its second jump for the next request it gets
in the air. Landing gives every jump back.
- `coyoteTime` (s) is how long after walking off the ground the first jump is
still the jump from the ground. Past it that jump counts as spent, so with
`maxJumps = 2` a request in the air takes the air jump, as it does after a
jump from the ground.
- `jumpBuffer` (s) keeps a request made in the air with no jump left, which
jumps the moment the character lands; the jump it takes closes the buffer.
A tap made just before landing takes off as a tap: with `minJumpHeight` set
it gives the short hop.
- In the air the velocity across the ground carries on and turns toward the
walk the bus asks for at `airControlFactor * 10` of the way a second. A run
held through a jump keeps its speed, so a 5 m/s running jump of about a
second covers about 5 m; letting go of the stick slows the character the
same way, and a new heading takes over gradually. The higher the factor the
faster it answers: at 6 or more it takes the asked-for walk within one 60 Hz
frame, and at 0 it keeps the take-off velocity untouched.
Four presets set every feel field at once. Apply one to a character, or name
it in `CharacterController.install(id, { preset = "weighty" })`:
```luau
preset.apply("characterController.presets.weighty",
{ entity = id, component = "CharacterController" })
```
| Preset | Ground | Jump |
|--------|--------|------|
| `instant` | no ramp: starts, stops and turns the frame it is asked | `jumpForce` against gravity, full height however it is pressed, no fall scaling or cap |
| `responsive` | 40 m/s² up, 50 m/s² braking: quick and crisp | 1.3 m in 0.38 s, let go at take-off 0.25 m, falls at 1.6x, capped at 20 m/s |
| `weighty` | 6 m/s² up, 6 m/s² braking: a heavy body that commits to its heading | 0.8 m in 0.36 s, full height every press, falls at 2x, capped at 25 m/s, little air control |
| `floaty` | 25 m/s² up, 15 m/s² braking: light, slides a little into stops | 2.5 m in 0.6 s, let go at take-off 0.3 m, drifts down at 0.6x, capped at 6 m/s, strong air control |
Each field can be set on its own afterwards, on top of a preset:
```luau
local cc = entity(id).component.get("CharacterController")
cc.jumpHeight, cc.jumpApexTime = 1.5, 0.45 -- a full jump: 1.5 m, top at 0.45 s
cc.minJumpHeight = 0.4 -- let go at take-off: 0.4 m
cc.fallGravityMultiplier = 1.8 -- comes down faster than it went up
```
## Stairs and steps
A grounded character walks up a riser or curb no taller than `stepHeight`
and down a drop no deeper than it. The capsule lands on the next tread in
the frame it reaches it and keeps that exact height, so the walls, the
ground and every query see the character where it stands.
What the player sees climbs smoothly: the character's direct children that
hold no collider and no physics body, with none below them (the body mesh, a
name label) are drawn
shifted back by the riser and close on the capsule as a critically damped
spring of `stepSmoothing` seconds (default `0.1`: about three fifths of a
step in that time, nine tenths in twice it). A rise or drop the ground's
slope accounts for, on a ramp or a hill, is drawn as it happens; a
character placed by something else (a teleport, a respawn) is drawn where it
was placed. `stepSmoothing = 0` draws the body on the capsule every frame.
The character's module (`characterController.update`) smooths its steps by
the same rule, through `movement.stepSmoothing`.
## Platforms, belts and the contact filter
The character meets the surfaces content declares on colliders the way a
rigid body does. Its ground, wall and ceiling queries are cast for the
character's own entity as their mover (`Physics.raycast(..., { mover = id })`
and the same option on the shape casts), so the contact rules the physics
step applies to bodies apply to it too:
- **One-way platforms.** A collider whose `oneWay` points up holds the
character from above only: it jumps up through the platform from below and
lands on top of it, and walks through its sides.
- **Dropping through.** `Physics.passThrough(character)` drops it through the
one-way colliders it stands on (or, with a second argument, only those that
entity owns). It falls through under its own gravity and meets each again
once it is clear of it.
```luau
Physics.passThrough(player) -- drop through what it stands on
Physics.passThrough(player, platform) -- drop through this platform alone
```
- **Moving surfaces.** Standing on a collider whose `surfaceVelocity` moves (a
conveyor belt, a treadmill, an escalator) carries the character at that
velocity on top of its own walk. It keeps the carry as momentum when it
jumps or walks off, and air control (`airControlFactor`) takes it back
toward the walk it asks for.
- **Moving bodies.** Standing on a body that itself moves or turns (a lift, a
moving platform, a turntable, a raft, a ship's deck, a train car) carries
the character with it: each frame the point under its feet goes where the
body took it, and the character turns with the body's turn about up, with
its own walk on top. It rises and descends with a lift without leaving the
ground, and keeps the body's motion at its feet as momentum when it jumps or
walks off. In the air it goes on moving with that motion until it lands, the
way a crate thrown off the deck does: air control (`airControlFactor`) steers
its walk relative to it, so a jump in place on a moving deck comes down on
the spot it left, and a wall it meets in the air stops the part of it the wall
is in the way of. A kinematic body a script moves (`localPosition` writes,
`Physics.setVelocity`), a dynamic body the simulation moves and a transform
something animates all carry it alike. The body is read where the frame
draws it (`Physics.drawnPose`), and the character is seated on the ground as
drawn, so the two stay in step on screen at any frame rate and physics tick
rate. A body a script moves after this component's `update` (an
`executionOrder` above -100, or a task) carries the character on the next
frame. The momentum a kinematic body or an animated transform leaves the
character with is how fast it carried the feet over the last tenth of a
second (and at least the last six frames), however the frames fell against
the physics ticks, and a body that vanishes from under the character
leaves it the same. A character something else moves (a teleport, a
respawn, a script writing its position) rides nothing until it stands on
a body again. A move faster than 150 m/s over the frame
(`StatedWalk.TELEPORT_SPEED`), or longer than 2.5 m over a frame of any
length (`StatedWalk.PLACEMENT_DISTANCE`), places it: it stands where it was
put at rest, with none of the fall, jump, walk or carry it had where it was
taken from, and with no footing on the ground it left: until it stands
again it has no `coyoteTime` to jump from, so with `maxJumps = 1` a
character put in mid-air takes no jump there. A shorter, slower move
carries it (a room-scale step in XR, a script pushing it along), and its
fall and walk go on; writing back the position it
already stands at moves it nowhere. In a multiplayer session the
character states its pose relative to the kinematic or dynamic body it
rides, and through a jump off it until it lands (`multiplayer.setPoseFrame`,
read back with `multiplayer.poseFrame`): every other peer draws it on that
body where that peer draws the body, so a rider on another peer's moving
deck holds its spot there on every screen.
```luau
local lift = entity.spawn("lift")
lift.component.add("BoxCollider", { half = { 1.5, 0.1, 1.5 } })
lift.component.add("Physics", { kind = "kinematic" })
Physics.setVelocity(lift.id, 0, 1, 0) -- the character on it rides up
Physics.setAngularVelocity(lift.id, 0, 1, 0) -- and turns with it
```
- **The contact filter.** Give the character a collider with a `contactTag`
(a trigger capsule is enough) and `Physics.setContactFilter` answers its
pairs: a collider whose tag the filter answers `"ignore"` or `"sensor"`
with the character's tag is one the character walks through.
```luau
player.component.add("CapsuleCollider", { isTrigger = true, contactTag = "player" })
Physics.setContactFilter("player", "ghostWall", "ignore")
```
## Launching, knockback and momentum
Give the character speed it did not choose (a launch pad, a spring, a
knockback from a hit, a rope let go of, a respawn that sends it off) with
`setVelocity` or `addVelocity` on its controller, in m/s in world space. The
same verbs on `Physics` reach it too, so `Physics.setVelocity(player, ...)`,
`Physics.addVelocity(player, ...)` and `Physics.getVelocity(player)` work on a
character as on a rigid body. A character holds no mass, so an impulse is
given as the change of speed it makes (`addVelocity`), and
`Physics.applyImpulse` moves it nowhere and says so in the log.
```luau
local cc = entity(player).component.get("CharacterController")
cc:addVelocity(0, 14, 0) -- a jump pad: straight up, 10 m high at 9.81 m/s²
cc:setVelocity(6, 10, 0) -- a launch pad: thrown up and along +X
cc:addVelocity(away.x * 8, 4, away.z * 8) -- knockback away from a hit
Physics.addVelocity(player, 0, 14, 0) -- the same through Physics
local v = cc:getVelocity() -- { x, y, z }, world space
```
`setVelocity` replaces the velocity the character has; `addVelocity` adds to
it (to its walk, its fall and any motion kept from a body it left). Called
several times before the character's next frame, `setVelocity` calls replace
one another and `addVelocity` calls add up, on top of the last `setVelocity`.
Either takes effect on the character's next frame, after anything that
placed it this frame, so a respawn onto a launch pad launches. Each takes
`(x, y, z)`, a `vector` or a table `{ x, y, z }`, and answers `true`.
The controller carries the velocity on through its own movement, the way it
carries a jump or the motion of a platform it leaves:
- **Standing, with no speed up**, the part across the ground is the
character's walk: `braking` slows it to a stop (or to the walk its input asks
for), so 6 m/s with a `braking` of 5 slides 3.6 m. Walls stop it a skin short
of their face and slide it along them, and a dynamic body in the way is
pushed as a walk pushes it.
- **With any speed up**, it leaves the ground on that frame and reads
`grounded` false until it lands. No jump is spent, and the jump it could
have taken from the ground in `coyoteTime` is gone, so a character with
`maxJumps = 2` has its air jump and one with 1 has none. It rises and falls
under its gravity (a launch rises its full height whether the jump control
is held or let go), a ceiling stops the rise, and on a moving body it adds
the body's motion as it leaves, as a jump does.
- **In the air**, the speed across the ground it was given flies on: air
control (`airControlFactor`) steers only the walk the input asks for, on top
of it, as it does over the motion kept from a platform. A wall met in the air
stops the part of it the wall is in the way of.
- **Landing**, what is left of it becomes the walk, and `braking` slows it on
the ground.
The movement is integrated exactly for each part of a frame, so a launch rises
the same height and lands the same distance away at 30 and at 120 frames a
second, within the step of the frame it lands on. On a body the character
stands on, the velocity is relative to that body. In a multiplayer session the
peer that moves the character applies it (the owner of a player's body, or
the peer it is bound to) and every other peer sees the motion through the
character's replication. On another peer's replica both calls leave the velocity
as it is and answer `false` (`Physics.setVelocity` and `Physics.addVelocity`
say so once in the log), so a hit landed on another player's body is sent to
the peer that moves it (a `Sync` event or `multiplayer.send`) and given there.
## Other characters
Characters meet one another as solid bodies. Every entity carrying a
`CharacterController` is an upright capsule of its `radius` and `height` to
every other character's wall pass (`physics.characters`), so two characters
walking into each other stop a skin apart, a character meeting another off
centre slides around it, and `blocked` reads true while a walk presses into
another character. The same holds for the local player, an NPC and another
player's body.
A character is a body while its entity is active and its controller enabled:
one set inactive (`entity(id):setActive(false)`) or with its controller
disabled (`enabled = false`) lets the others walk through it until it is
switched back on.
The push rule:
- A walk never moves another character. Each peer moves only the characters
it owns, against where it sees the others, so two players' bodies meet on
both peers' screens.
- Two characters that overlap (placed into one another, two spawned at one
point, a body the network shows a frame late) move apart at up to 2 m/s
each, each taking half of the overlap, and never through a wall. A pair
pressed together stands still a skin apart.
- A character gives way to no body moving into it: the one walking in is the
one stopped, on the peer that moves it, so a player walking into a standing
one never drives it along, however late each peer sees the other.
- Only bodies sharing some height meet: a character jumping over another
passes above it, and one coming down onto another's head is moved off it to
the side.
Which characters pass through which is the contact filter's to say, by each
character's `contactTag` (`"character"` unless content names another):
```luau
Physics.setContactFilter("character", "character", "ignore") -- nobody blocks anybody
ghost.component.get("CharacterController").contactTag = "ghost"
Physics.setContactFilter("ghost", "character", "ignore") -- the ghost walks through people
Physics.setContactFilter("redTeam", "redTeam", "ignore") -- teammates pass, foes block
```
## Triggers, pickups and the bodies it walks into
The character holds no rigid body: it states its capsule (`Physics.setWaterVolume`),
`height` tall and `radius` round, standing on its feet. That capsule is how
the rest of the world meets it:
- **Triggers and pickups.** A trigger collider hears the character enter and
leave it as it hears a body (`Physics.onTrigger(zone, fn)`, with `other`
the character's entity), and a listener on the character
(`Physics.onTrigger(character, fn)`) hears every trigger it goes through.
Every engine the character exists in hears it, the remote players' bodies
included, so a zone counted on each peer counts every player. A trigger on
an entity beneath the character (a sensor it carries) rides with it and
does not hear it.
- **Water.** `Physics.onWater` hears it go in and out of the water and
`Physics.immersion` reads how deep it stands.
- **Pushing.** A dynamic body the walk runs into is pushed along the walk:
the walk stops at it as at a wall, and the body is given the impulse that
brings its speed along the walk up to the walk's, with at most `pushForce`
newtons (400 by default) behind it. On level ground a body moves once
`pushForce` passes its friction coefficient times its weight, so at the
default a 5 kg crate goes along at the walk with the character behind it and
a 500 kg one stands like a wall. `pushForce = 0` makes every body a wall.
- **Bodies moving into it.** A body that moves into the character puts it
back outside, as a wall that moved into it does.
```luau
local player = layers.active.players.localPlayer.avatar
Physics.onTrigger(coin, function(e)
if e.kind == "enter" and e.other == player.id then collect(coin) end
end)
player.component.get("CharacterController").pushForce = 150 -- a weaker shove
```
## Telemetry
These read back what the mover did on the frame just simulated:
- `grounded` — standing on ground no steeper than `maxSlopeAngle`.
- `falling` — in the air and descending.
- `sliding` — on ground too steep to stand on, being carried down it.
- `blocked` — the character asked to move horizontally and the wall pass left
it with none of that movement: pressed into a wall, or wedged where two
surfaces meet. This is what tells a character standing still apart from one
whose walk is being refused.
- `slopeAngle` — the angle, in degrees, of the ground under it.
- `velocityX` / `velocityY` / `velocityZ` / `horizontalSpeed` — its velocity,
across the frame it stands in (`frame`). `getVelocity()` reads it in world
space, with any velocity given since its last frame.
- `jumpCount`: jumps used since it last landed. Walking off a ledge counts
the jump from the ground as used once `coyoteTime` has passed.
## Standing still
A character standing on the ground with nothing asking it to move rests: it
takes no movement step and writes none of its fields, so a crowd of idle
characters costs little more than the check each one makes that nothing has
reached it. It takes its step again on the frame anything does: a write to its
input bus or any of its fields, its feet moved by something else, the ground
or the body it rides moving or changing (taken away, switched off, passed
through, its surface set moving), a collider coming to overlap it, another
character moving within reach, the gravity at its feet changing, or its being
bound as the local player's body. Entities spawned and despawned elsewhere in
the world leave it resting. Telemetry reads what it read on the frame it came
to rest.
`stats()` reads how its frames went:
```luau
local s = entity(id).component.get("CharacterController"):stats()
print(s.resting, s.stepFrames, s.restFrames)
```
# Locomotion
Blend-space-driven locomotion for entities running the
characterController package. Feeds a single 2D blend space (strafe-angle
on X, speed on Y) with idle / walk-{F,L,R,B} / run-{F,L,R,B} / sprintF
clips from the character's own walk.
The walk is what the character's `CharacterController` states each frame it
moves it: its walk across what it stands on, so a body carried by a conveyor,
a moving deck or a lift while it stands still plays its idle, and the walk it
is asked for. The body turns toward the walk it is asked for at whatever speed
it asks (a light stick push, a walk into a wall the walls refuse), and with
none asked toward its velocity once that is faster than `moveDeadzone`. A
body that carries neither a `MovementState` nor a `CharacterController` reads
the walk the nearest of its ancestors with a `CharacterController` states, so
a body parented under a root a controller walks idles on a conveyor and turns
toward a wall it is asked to walk into, as that root does. On a frame nothing
states the walk (another peer's avatar the sync moves, a body a script moves)
the velocity is measured: from the entity's `MovementState`, or its
`CharacterController` without one, against its parent; and on a body that
carries neither, from its position in the world, so a body parented under the
root an NPC's brain and navigation move walks and faces with that root.
The strafe angle is the signed angle from the body's facing to
its velocity, positive toward the body's right (`forward x up`): the R
clips sit at +90, the L clips at -90 and the B clips at 180. Each
clip's point sits at the speed the clip carries this body at: its
retarget bake measures how fast the ground passes under the
stance foot on this body's legs, so the feet move with the ground at
whatever speed the body moves. A clip that plays without a measured
speed sits at its gait's `walkSpeed` / `runSpeed` / `sprintSpeed`.
Pair on the same entity (or a parent of) a `SkinnedModel`. The
component creates the AnimGraph, polls for the SkinnedModel child
once start() has run, registers the clips as blend-space points and
plays the graph. `update()` damps speed + angle and writes them to
the active blend space each frame.
Once every clip has bound, the component hands the graph to the engine
(`AnimGraph:runNatively`): the engine reads the walk the mover states, or
measures the root's velocity from its position, turns the body as above, damps the speed and angle and evaluates
the blend space every frame, and the component's `update` is held. A body
the sync moves (another peer's avatar), an NPC and the local player's own
body all walk with no script running for their pose. The component takes
the graph back when one of its fields changes or another component changes
the graph (a layer spliced over it), and runs it in script while the graph
holds a node the engine does not run, a clip that drives blend shapes, or
its velocity is read from a `CharacterController` without a `MovementState`.
`component.get("Locomotion"):stats()` reads
`{ native, handle?, frames?, refusal?, motion, space }`: where the graph runs,
why not in the engine when it does not, whether the velocity is the walk the
mover stated (`motion = "stated"`) or a measured one (`"measured"`), and
whether a measured velocity is the body's motion against its parent
(`space = "local"`) or in the world (`"world"`).
## Facing in multiplayer
The body's facing is the rotation of its anchor, the child of the root that
holds the skinned body, and only the peer that owns the body turns it. The
component names that child with `multiplayer.syncChildPose`, so its local
pose travels with the synced root: every other peer draws the facing the
owner states, a short delay behind on the timeline the root is drawn on, at
join, after the body stops and through a turn in place alike (a script that
turns the anchor on the owner's peer is drawn turned everywhere). On a peer
that draws it so, `multiplayer.childPoseFromOwner(anchor)` reads true and the
component, in script or in the engine, reads its strafe angle from that
facing and leaves the anchor's rotation as the owner states it.
## Jumping, falling and landing
`jumpAnim`, `fallAnim` and `landAnim` are the air poses: the take-off and
rise, the fall, and the landing. With any of them set (the `synty` preset sets
all three, and the built-in humanoid avatar uses it) the blend space and those
clips sit under one Mixer, and the body moves between four states by the
motion of its root:
- **ground**: the locomotion blend plays.
- **rise**: the body is off the ground and moving up faster than 1 m/s. The
take-off clip plays from its start.
- **fall**: the body is off the ground and moving down faster than 1 m/s (a
walk off a ledge), or its rise has stopped. The fall clip loops.
- **land**: the ground is under the body again. The landing clip plays from its
start and fades into the locomotion blend over `landTime` seconds.
The body is off the ground while nothing stands within 5 cm below its feet
across its footprint. The footprint is the disc its `CharacterController`
stands on, its `radius` less its `skinWidth` (0.25 m without one), and the
5 cm are counted from the ground the feet stand a `skinWidth` above, so a body
standing on the edge of a ledge, or with a wide skin, reads the ground its
controller stands on. A sphere of the footprint's radius is swept down past
the colliders the character carries, far enough to reach an edge at the rim
of the footprint, and the surface it meets counts where the sphere touched it.
A change of the controller's `radius` or `skinWidth` reaches the sweep on the
next frame (the controller calls `footingChanged()`). A body on nothing that
moves neither up nor down (a preview, a mannequin) keeps the locomotion blend.
Each pose's weight moves toward its state's at
`1 / airBlendTime` a second. A slot left nil, or whose clip failed to bind, is
stood in for: the take-off by the fall, the fall by the take-off, and the
landing by the locomotion blend. A clip that failed to bind keeps the graph in
script, and `stats().refusal` names the clip.
The engine runs the air states with the rest of the graph, so the local
player, an NPC and another player's body the sync moves all jump, fall and
land the same way with no script running for their pose.
```luau
local loco = entity(id).component.get("Locomotion")
loco.jumpAnim = asset.resolve("A_Jump_Running_Masc", "animation")
loco.landTime = 0.2
```
# LocomotionFull
> In a world that installs the Controllers library (`world.installLibrary({ world = "034d26cf-dc3d-4123-abad-3944f97c6a60", as = "controllers" })`), every package name on this page is written with `@controllers::` in front of it, and `asset.list("component")` lists each one under that name.
The full Synty locomotion animation layer: 87 in-place clips (walk, run and
sprint in eight directions, crouching, starts, stops, turns on the spot, jumps,
falls and landings) driven by a five-state machine (locomotion, crouch, jump,
fall, idle) over a layered `AnimGraph`. Put it on a character's body in place
of `Locomotion`, beside the `CharacterController` that moves it and the
`MovementState` that states the motion it reads; the `synty_full` preset holds
its clip slots and speeds. Clips retarget from their source rig onto the
body's rig, so the set drives any humanoid body.
```luau
body.component.add("characterController.LocomotionFull", {})
preset.apply("characterController.presets.synty_full", { entity = body.id, component = "characterController.LocomotionFull" })
```
# MovementState
Component that exposes movement state for controller-driven animation and gameplay consumers.
# WASDInput
Action-to-input-bus driver. Reads the `move` axis and `jump` action
each frame, remaps `move` to the active viewport camera's
forward/right basis (via `camera.main()` + `entity(camId).transform.forward`),
and writes the resulting world-space horizontal velocity to a target
component's input fields:
- `target.inputX`, `target.inputZ` — world-space velocity × speed
- `target.inputJump` — boolean, true while the jump action is held
Defaults to writing to `CharacterController` on the same entity, but
the field names are the contract — any component that exposes
`inputX/inputZ/inputJump` is a valid sink (vehicles, hovercraft,
custom CCs).
## Why generic
Independent of which camera is active and independent of the visual
layer:
- Works with any camera (third-person, top-down, FPS, fixed, vehicle).
- Works with no camera (falls back to world-axis WASD).
- Works without `Locomotion` or any animation system — CC moves,
visualization is opt-in.
- Works without a follow rig — `camera.main()` is the seam, not a
specific camera component.
## Public fields
| Field | Default | Purpose |
|---|---|---|
| `speed` | `5.0` | Multiplier on the unit-length input vector |
| `targetComponent` | `"CharacterController"` | Component to write `inputX/inputZ/inputJump` onto |
A custom control scheme is authored as an inputMap that rebinds the
`move` axis and `jump` action — not per-instance key fields on this
component.
## Example
```lua
-- Player with CC + WASDInput + any camera
entity(playerId).component.add("CharacterController")
entity(playerId).component.add("WASDInput")
-- Active viewport camera (any kind)
local cam = entity.spawn("cam", { parent = playerId })
cam.component.add("Camera", { fov = 60, priority = 0 })
cam.component.add("orbital_follow", { follow = playerId })
-- Press W → CC.inputX/inputZ are written camera-relative each frame
-- → CC translates the body → MovementState reports velocity →
-- (optional) Locomotion rotates the visible mesh + plays anims.
```
# characterController
> In a world that installs the Controllers library (`world.installLibrary({ world = "034d26cf-dc3d-4123-abad-3944f97c6a60", as = "controllers" })`), every package name on this page is written with `@controllers::` in front of it, and `asset.list("component")` lists each one under that name.
Physics-based character controller — capsule movement with
ground / wall / ceiling detection. A kinematic controller using
raycasts for collision; handles gravity, jumping, slope traversal,
step climbing, wall sliding, coyote time, and riding the bodies it stands on
(`physics.platform`). The
module owns a per-entity registry; attach once, call `move` / `jump`
each frame, then drive a per-frame `update(dt)`. The
`install` / `uninstall` / `preset` surface wires up the standard set
of components (CharacterController + Locomotion + MovementState +
optional WASDInput and third-person camera child) in one call.
Require it to use the surface:
```luau
local CharacterController = require("characterController.characterController")
```
## Exports
- `CC.attach(entityId: string, userConfig: Config?)` — register an entity, merge user overrides over `Defaults.standard`.
- `CC.detach(entityId: string)` — drop the registry entry.
- `CC.move(entityId: string, direction: Vec3)` — set per-frame world-space movement input (`y` is ignored).
- `CC.jump(entityId: string)` — request a jump; honours coyote time and jump buffer.
- `CC.getState(entityId: string) -> State` — snapshot copy of grounded / falling / velocity / etc.
- `CC.getVelocity(entityId: string) -> (number, number, number)` — current `vx, vy, vz`, with any velocity given since the last update; for an entity carrying the `CharacterController` component, that component's.
- `CC.setVelocity(entityId: string, x: number | Vec3 | vector, y: number?, z: number?) -> boolean` — replace the character's velocity (m/s, world space): a launch pad, a knockback. Standing with no speed up it is walk `braking` slows; with speed up it leaves the ground and flies, air control steering only the walk asked for on top of it, and on landing what is left is braked. Takes effect on the next update, after a placement.
- `CC.addVelocity(entityId: string, x: number | Vec3 | vector, y: number?, z: number?) -> boolean` — add to the character's velocity, an impulse as the change of speed it makes; calls before the next update add up. Both reach a body this module moves (`attach`) and one carrying the `CharacterController` component (`install`), answer false on another peer's replica, and raise for an entity with neither.
- `CC.setGravity(entityId: string, gravity: number)` — update gravity at runtime.
- `CC.setMaxSlope(entityId: string, degrees: number)` — update max walkable slope angle.
- `CC.setConfig(entityId: string, key: string, value: any)` — update a single config key.
- `CC.getConfig(entityId: string) -> Config` — config copy.
- `CC.update(entityId: string, dt: number)` — advance one frame (resolve movement, write position, tick state machine). `dt` is clamped to 0.1. A body something else placed elsewhere since the last update (a teleport, a respawn, a script writing its position), faster than `StatedWalk.TELEPORT_SPEED` (150 m/s) or longer than `StatedWalk.PLACEMENT_DISTANCE` (2.5 m) over a frame of any length (`StatedWalk.placesCharacter`), starts from where it was put at rest, with no footing or coyote time to jump from until it stands again; one carried shorter and slower keeps its motion.
- `CC.isAttached(entityId: string) -> boolean` — whether the entity has a registration.
- `CC.install(entityId: string, opts: InstallOpts?) -> InstallResult` — high-level wire-up (components + optional camera / mesh / WASDInput).
- `CC.uninstall(entityId: string) -> UninstallResult` — remove everything `install` added.
- `CC.preset(entityId: string, presetName: string) -> PresetResult` — apply a preset to an already-installed character in place.
Types:
- `Vec3 = { x: number, y: number, z: number }`
- `Config = { height?, radius?, maxSlopeAngle?, stepHeight?, gravity?, jumpForce?, coyoteTime?, jumpBuffer?, maxJumps?, airControlFactor?, groundSnapDistance?, stepSmoothing?, skinWidth?, moveSpeed? }`
- `State = { grounded, falling, sliding, wallContact, wallNormal, velocity, groundNormal, slopeAngle, jumpCount, timeSinceGrounded, timeSinceWallContact, onMovingPlatform, platformEntity? }`
- `BundleRef = { guid?, __ref?, identity?, path?, name? }`
- `InstallOpts = { preset?, camera?, input?, mesh?, overrides? }`
- `InstallResult = { entityId, cameraId?, meshHostId? }`
- `UninstallResult = { entityId, despawned }`
- `PresetResult = { entityId, preset, applied }`
## Usage
```luau
local CharacterController = require("characterController.characterController")
-- Low-level: manual attach + per-frame drive.
CharacterController.attach(entityId, { gravity = -15, jumpForce = 7 })
CharacterController.move(entityId, { x = 1, y = 0, z = 0 })
CharacterController.update(entityId, dt)
-- High-level: one-call wire-up.
CharacterController.install(entityId, {
preset = "humanoid_default",
camera = true,
overrides = { jumpForce = 8 },
})
```
## Notes
- `attach` merges user config over `Defaults.standard`; passing
unknown keys is allowed (they survive into the config table).
- `update` clamps `dt` to 0.1s to prevent capsule tunnelling on
lag spikes.
- `getState` and `getConfig` return shallow copies — mutating the
result does not affect the controller. The returned `velocity` /
`wallNormal` / `groundNormal` are also shallow copies.
- `install` is idempotent per component — re-running on an already
wired entity adds nothing new. `uninstall` removes the components
and any third-person-camera child that targets this entity.
- `preset` mutates fields in place and never adds or removes
components — call `install` first.
# A_POLY_BL_Crouch_BckStrafeBL_Masc
A Synty Polygon Masculine animation clip: crouched walk backward, strafing BL. `LocomotionFull` (the `synty_full` preset) plays it on the Synty humanoid rig; any humanoid retargets it.
# A_Crouch_BckStrafeBR_Masc
A Synty Polygon Masculine animation clip: crouched walk backward, strafing BR. `LocomotionFull` (the `synty_full` preset) plays it on the Synty humanoid rig; any humanoid retargets it.
# A_POLY_BL_Crouch_BckStrafeB_Masc
A Synty Polygon Masculine animation clip: crouched walk backward, strafing B. `LocomotionFull` (the `synty_full` preset) plays it on the Synty humanoid rig; any humanoid retargets it.
# A_POLY_BL_Crouch_BckStrafeFL_Masc
A Synty Polygon Masculine animation clip: crouched walk backward, strafing FL. `LocomotionFull` (the `synty_full` preset) plays it on the Synty humanoid rig; any humanoid retargets it.
# A_POLY_BLCrouch_BckStrafeL_Masc
A Synty Polygon Masculine animation clip: crouched walk backward, strafing L. `LocomotionFull` (the `synty_full` preset) plays it on the Synty humanoid rig; any humanoid retargets it.
# A_POLY_BL_Crouch_BckStrafeR_Masc
A Synty Polygon Masculine animation clip: crouched walk backward, strafing R. `LocomotionFull` (the `synty_full` preset) plays it on the Synty humanoid rig; any humanoid retargets it.
# A_POLY_BL_Crouch_FwdStrafeBR_Masc
A Synty Polygon Masculine animation clip: crouched walk forward, strafing BR. `LocomotionFull` (the `synty_full` preset) plays it on the Synty humanoid rig; any humanoid retargets it.
# A_POLY_BL_Crouch_FwdStrafeFL_Masc
A Synty Polygon Masculine animation clip: crouched walk forward, strafing FL. `LocomotionFull` (the `synty_full` preset) plays it on the Synty humanoid rig; any humanoid retargets it.
# A_POLY_BL_Crouch_FwdStrafeFR_Masc
A Synty Polygon Masculine animation clip: crouched walk forward, strafing FR. `LocomotionFull` (the `synty_full` preset) plays it on the Synty humanoid rig; any humanoid retargets it.
# A_POLY_BL_Crouch_FwdStrafeF_Masc
A Synty Polygon Masculine animation clip: crouched walk forward, strafing F. `LocomotionFull` (the `synty_full` preset) plays it on the Synty humanoid rig; any humanoid retargets it.
# A_POLY_BL_Crouch_FwdStrafeL_Masc
A Synty Polygon Masculine animation clip: crouched walk forward, strafing L. `LocomotionFull` (the `synty_full` preset) plays it on the Synty humanoid rig; any humanoid retargets it.
# A_POLY_BL_Crouch_FwdStrafeR_Masc
A Synty Polygon Masculine animation clip: crouched walk forward, strafing R. `LocomotionFull` (the `synty_full` preset) plays it on the Synty humanoid rig; any humanoid retargets it.
# A_Crouch_ToStand_Masc
A Synty Polygon Masculine animation clip: crouched walk into Stand. `LocomotionFull` (the `synty_full` preset) plays it on the Synty humanoid rig; any humanoid retargets it.
# A_Idle_Crouching_Masc
A Synty Polygon Masculine animation clip: idle crouching. `LocomotionFull` (the `synty_full` preset) plays it on the Synty humanoid rig; any humanoid retargets it.
# A_Idle_Standing_Masc
A Synty Polygon Masculine animation clip: idle standing. `LocomotionFull` (the `synty_full` preset) plays it on the Synty humanoid rig; any humanoid retargets it.
# A_Run_Start180L_Masc
A Synty Polygon Masculine animation clip: run starting 180L. `LocomotionFull` (the `synty_full` preset) plays it on the Synty humanoid rig; any humanoid retargets it.
# A_Idle_ToRun180R_Masc
A Synty Polygon Masculine animation clip: idle into Run180R. `LocomotionFull` (the `synty_full` preset) plays it on the Synty humanoid rig; any humanoid retargets it.
# A_Idle_ToRun90L_Masc
A Synty Polygon Masculine animation clip: idle into Run90L. `LocomotionFull` (the `synty_full` preset) plays it on the Synty humanoid rig; any humanoid retargets it.
# A_Idle_ToRun90R_Masc
A Synty Polygon Masculine animation clip: idle into Run90R. `LocomotionFull` (the `synty_full` preset) plays it on the Synty humanoid rig; any humanoid retargets it.
# A_Idle_ToRunF_Masc
A Synty Polygon Masculine animation clip: idle into RunF. `LocomotionFull` (the `synty_full` preset) plays it on the Synty humanoid rig; any humanoid retargets it.
# A_Idle_ToWalk180L_Masc
A Synty Polygon Masculine animation clip: idle into Walk180L. `LocomotionFull` (the `synty_full` preset) plays it on the Synty humanoid rig; any humanoid retargets it.
# A_Idle_ToWalk180R_Masc
A Synty Polygon Masculine animation clip: idle into Walk180R. `LocomotionFull` (the `synty_full` preset) plays it on the Synty humanoid rig; any humanoid retargets it.
# A_Idle_ToWalk90L_Masc
A Synty Polygon Masculine animation clip: idle into Walk90L. `LocomotionFull` (the `synty_full` preset) plays it on the Synty humanoid rig; any humanoid retargets it.
# A_Idle_ToWalk90R_Masc
A Synty Polygon Masculine animation clip: idle into Walk90R. `LocomotionFull` (the `synty_full` preset) plays it on the Synty humanoid rig; any humanoid retargets it.
# A_Idle_ToWalkF_Masc
A Synty Polygon Masculine animation clip: idle into WalkF. `LocomotionFull` (the `synty_full` preset) plays it on the Synty humanoid rig; any humanoid retargets it.
# A_InAir_FallLarge_Masc
A Synty Polygon Masculine animation clip: in the air FallLarge. `LocomotionFull` (the `synty_full` preset) plays it on the Synty humanoid rig; any humanoid retargets it.
# A_InAir_FallShort_Masc
A Synty Polygon Masculine animation clip: in the air FallShort. `LocomotionFull` (the `synty_full` preset) plays it on the Synty humanoid rig; any humanoid retargets it.
# A_Jump_Idle_Masc
A Synty Polygon Masculine animation clip: jump idle. `LocomotionFull` (the `synty_full` preset) plays it on the Synty humanoid rig; any humanoid retargets it.
# A_Jump_Running_Masc
A Synty Polygon Masculine animation clip: jump Running. `LocomotionFull` (the `synty_full` preset) plays it on the Synty humanoid rig; any humanoid retargets it.
# A_Jump_Sprinting_Masc
A Synty Polygon Masculine animation clip: jump Sprinting. `LocomotionFull` (the `synty_full` preset) plays it on the Synty humanoid rig; any humanoid retargets it.
# A_Jump_Walking_Masc
A Synty Polygon Masculine animation clip: jump Walking. `LocomotionFull` (the `synty_full` preset) plays it on the Synty humanoid rig; any humanoid retargets it.
# A_Land_IdleHard_Masc
A Synty Polygon Masculine animation clip: landing IdleHard. `LocomotionFull` (the `synty_full` preset) plays it on the Synty humanoid rig; any humanoid retargets it.
# A_Land_IdleMedium_Masc
A Synty Polygon Masculine animation clip: landing IdleMedium. `LocomotionFull` (the `synty_full` preset) plays it on the Synty humanoid rig; any humanoid retargets it.
# A_Land_IdleSoft_Masc
A Synty Polygon Masculine animation clip: landing IdleSoft. `LocomotionFull` (the `synty_full` preset) plays it on the Synty humanoid rig; any humanoid retargets it.
# A_Run_BckStrafeBL_Masc
A Synty Polygon Masculine animation clip: run backward, strafing BL. `LocomotionFull` (the `synty_full` preset) plays it on the Synty humanoid rig; any humanoid retargets it.
# A_Run_BckStrafeBR_Masc
A Synty Polygon Masculine animation clip: run backward, strafing BR. `LocomotionFull` (the `synty_full` preset) plays it on the Synty humanoid rig; any humanoid retargets it.
# A_Run_BckStrafeB_Masc
A Synty Polygon Masculine animation clip: run backward, strafing B. `LocomotionFull` (the `synty_full` preset) plays it on the Synty humanoid rig; any humanoid retargets it.
# A_Run_BckStrafeFL_Masc
A Synty Polygon Masculine animation clip: run backward, strafing FL. `LocomotionFull` (the `synty_full` preset) plays it on the Synty humanoid rig; any humanoid retargets it.
# A_Run_BckStrafeL_Masc
A Synty Polygon Masculine animation clip: run backward, strafing L. `LocomotionFull` (the `synty_full` preset) plays it on the Synty humanoid rig; any humanoid retargets it.
# A_Run_BckStrafeR_Masc
A Synty Polygon Masculine animation clip: run backward, strafing R. `LocomotionFull` (the `synty_full` preset) plays it on the Synty humanoid rig; any humanoid retargets it.
# A_Run_Down25F_Masc
A Synty Polygon Masculine animation clip: run Down25F. `LocomotionFull` (the `synty_full` preset) plays it on the Synty humanoid rig; any humanoid retargets it.
# A_Run_F_Masc
A Synty Polygon Masculine animation clip: run F. `LocomotionFull` (the `synty_full` preset) plays it on the Synty humanoid rig; any humanoid retargets it.
# A_Run_FwdStrafeBR_Masc
A Synty Polygon Masculine animation clip: run forward, strafing BR. `LocomotionFull` (the `synty_full` preset) plays it on the Synty humanoid rig; any humanoid retargets it.
# A_Run_FwdStrafeFL_Masc
A Synty Polygon Masculine animation clip: run forward, strafing FL. `LocomotionFull` (the `synty_full` preset) plays it on the Synty humanoid rig; any humanoid retargets it.
# A_Run_FwdStrafeFR_Masc
A Synty Polygon Masculine animation clip: run forward, strafing FR. `LocomotionFull` (the `synty_full` preset) plays it on the Synty humanoid rig; any humanoid retargets it.
# A_Run_FwdStrafeF_Masc
A Synty Polygon Masculine animation clip: run forward, strafing F. `LocomotionFull` (the `synty_full` preset) plays it on the Synty humanoid rig; any humanoid retargets it.
# A_Run_FwdStrafeL_Masc
A Synty Polygon Masculine animation clip: run forward, strafing L. `LocomotionFull` (the `synty_full` preset) plays it on the Synty humanoid rig; any humanoid retargets it.
# A_Run_FwdStrafeR_Masc
A Synty Polygon Masculine animation clip: run forward, strafing R. `LocomotionFull` (the `synty_full` preset) plays it on the Synty humanoid rig; any humanoid retargets it.
# A_Run_ToIdleF_LFoot_Masc
A Synty Polygon Masculine animation clip: run into IdleF LFoot. `LocomotionFull` (the `synty_full` preset) plays it on the Synty humanoid rig; any humanoid retargets it.
# A_Run_ToIdleF_RFoot_Masc
A Synty Polygon Masculine animation clip: run into IdleF RFoot. `LocomotionFull` (the `synty_full` preset) plays it on the Synty humanoid rig; any humanoid retargets it.
# A_Run_Up25F_Masc
A Synty Polygon Masculine animation clip: run Up25F. `LocomotionFull` (the `synty_full` preset) plays it on the Synty humanoid rig; any humanoid retargets it.
# A_Shuffle_Crouching_B_Masc
A Synty Polygon Masculine animation clip: Shuffle crouching B. `LocomotionFull` (the `synty_full` preset) plays it on the Synty humanoid rig; any humanoid retargets it.
# A_Shuffle_Crouching_F_Masc
A Synty Polygon Masculine animation clip: Shuffle crouching F. `LocomotionFull` (the `synty_full` preset) plays it on the Synty humanoid rig; any humanoid retargets it.
# A_Shuffle_Crouching_L_Masc
A Synty Polygon Masculine animation clip: Shuffle crouching L. `LocomotionFull` (the `synty_full` preset) plays it on the Synty humanoid rig; any humanoid retargets it.
# A_Shuffle_Crouching_R_Masc
A Synty Polygon Masculine animation clip: Shuffle crouching R. `LocomotionFull` (the `synty_full` preset) plays it on the Synty humanoid rig; any humanoid retargets it.
# A_Shuffle_Standing_B_Masc
A Synty Polygon Masculine animation clip: Shuffle standing B. `LocomotionFull` (the `synty_full` preset) plays it on the Synty humanoid rig; any humanoid retargets it.
# A_Shuffle_Standing_F_Masc
A Synty Polygon Masculine animation clip: Shuffle standing F. `LocomotionFull` (the `synty_full` preset) plays it on the Synty humanoid rig; any humanoid retargets it.
# A_Shuffle_Standing_L_Masc
A Synty Polygon Masculine animation clip: Shuffle standing L. `LocomotionFull` (the `synty_full` preset) plays it on the Synty humanoid rig; any humanoid retargets it.
# A_Shuffle_Standing_R_Masc
A Synty Polygon Masculine animation clip: Shuffle standing R. `LocomotionFull` (the `synty_full` preset) plays it on the Synty humanoid rig; any humanoid retargets it.
# A_Sprint_Down25F_Masc
A Synty Polygon Masculine animation clip: sprint Down25F. `LocomotionFull` (the `synty_full` preset) plays it on the Synty humanoid rig; any humanoid retargets it.
# A_Sprint_F_Masc
A Synty Polygon Masculine animation clip: sprint F. `LocomotionFull` (the `synty_full` preset) plays it on the Synty humanoid rig; any humanoid retargets it.
# A_Sprint_ToCrouch_Masc
A Synty Polygon Masculine animation clip: sprint into Crouch. `LocomotionFull` (the `synty_full` preset) plays it on the Synty humanoid rig; any humanoid retargets it.
# A_Sprint_Up25F_Masc
A Synty Polygon Masculine animation clip: sprint Up25F. `LocomotionFull` (the `synty_full` preset) plays it on the Synty humanoid rig; any humanoid retargets it.
# A_Stand_ToCrouch_Masc
A Synty Polygon Masculine animation clip: standing into Crouch. `LocomotionFull` (the `synty_full` preset) plays it on the Synty humanoid rig; any humanoid retargets it.
# A_Turn_Crouching_90L_Masc
A Synty Polygon Masculine animation clip: turn on the spot crouching 90L. `LocomotionFull` (the `synty_full` preset) plays it on the Synty humanoid rig; any humanoid retargets it.
# A_Turn_Crouching_90R_Masc
A Synty Polygon Masculine animation clip: turn on the spot crouching 90R. `LocomotionFull` (the `synty_full` preset) plays it on the Synty humanoid rig; any humanoid retargets it.
# A_Turn_Standing_180L_Masc
A Synty Polygon Masculine animation clip: turn on the spot standing 180L. `LocomotionFull` (the `synty_full` preset) plays it on the Synty humanoid rig; any humanoid retargets it.
# A_Turn_Standing_180R_Masc
A Synty Polygon Masculine animation clip: turn on the spot standing 180R. `LocomotionFull` (the `synty_full` preset) plays it on the Synty humanoid rig; any humanoid retargets it.
# A_Turn_Standing_90L_Masc
A Synty Polygon Masculine animation clip: turn on the spot standing 90L. `LocomotionFull` (the `synty_full` preset) plays it on the Synty humanoid rig; any humanoid retargets it.
# A_Turn_Standing_90R_Masc
A Synty Polygon Masculine animation clip: turn on the spot standing 90R. `LocomotionFull` (the `synty_full` preset) plays it on the Synty humanoid rig; any humanoid retargets it.
# A_Walk_BckStrafeBL_Masc
A Synty Polygon Masculine animation clip: walk backward, strafing BL. `LocomotionFull` (the `synty_full` preset) plays it on the Synty humanoid rig; any humanoid retargets it.
# A_Walk_BckStrafeBR_Masc
A Synty Polygon Masculine animation clip: walk backward, strafing BR. `LocomotionFull` (the `synty_full` preset) plays it on the Synty humanoid rig; any humanoid retargets it.
# A_Walk_BckStrafeB_Masc
A Synty Polygon Masculine animation clip: walk backward, strafing B. `LocomotionFull` (the `synty_full` preset) plays it on the Synty humanoid rig; any humanoid retargets it.
# A_Walk_BckStrafeFL_Masc
A Synty Polygon Masculine animation clip: walk backward, strafing FL. `LocomotionFull` (the `synty_full` preset) plays it on the Synty humanoid rig; any humanoid retargets it.
# A_Walk_BckStrafeL_Masc
A Synty Polygon Masculine animation clip: walk backward, strafing L. `LocomotionFull` (the `synty_full` preset) plays it on the Synty humanoid rig; any humanoid retargets it.
# A_Walk_BckStrafeR_Masc
A Synty Polygon Masculine animation clip: walk backward, strafing R. `LocomotionFull` (the `synty_full` preset) plays it on the Synty humanoid rig; any humanoid retargets it.
# A_Walk_Down25F_Masc
A Synty Polygon Masculine animation clip: walk Down25F. `LocomotionFull` (the `synty_full` preset) plays it on the Synty humanoid rig; any humanoid retargets it.
# A_Walk_F_Masc
A Synty Polygon Masculine animation clip: walk F. `LocomotionFull` (the `synty_full` preset) plays it on the Synty humanoid rig; any humanoid retargets it.
# A_Walk_FwdStrafeBR_Masc
A Synty Polygon Masculine animation clip: walk forward, strafing BR. `LocomotionFull` (the `synty_full` preset) plays it on the Synty humanoid rig; any humanoid retargets it.
# A_Walk_FwdStrafeFL_Masc
A Synty Polygon Masculine animation clip: walk forward, strafing FL. `LocomotionFull` (the `synty_full` preset) plays it on the Synty humanoid rig; any humanoid retargets it.
# A_Walk_FwdStrafeFR_Masc
A Synty Polygon Masculine animation clip: walk forward, strafing FR. `LocomotionFull` (the `synty_full` preset) plays it on the Synty humanoid rig; any humanoid retargets it.
# A_Walk_FwdStrafeF_Masc
A Synty Polygon Masculine animation clip: walk forward, strafing F. `LocomotionFull` (the `synty_full` preset) plays it on the Synty humanoid rig; any humanoid retargets it.
# A_Walk_FwdStrafeL_Masc
A Synty Polygon Masculine animation clip: walk forward, strafing L. `LocomotionFull` (the `synty_full` preset) plays it on the Synty humanoid rig; any humanoid retargets it.
# A_Walk_FwdStrafeR_Masc
A Synty Polygon Masculine animation clip: walk forward, strafing R. `LocomotionFull` (the `synty_full` preset) plays it on the Synty humanoid rig; any humanoid retargets it.
# A_Walk_ToIdleF_LFoot_Masc
A Synty Polygon Masculine animation clip: walk into IdleF LFoot. `LocomotionFull` (the `synty_full` preset) plays it on the Synty humanoid rig; any humanoid retargets it.
# A_Walk_ToIdleF_RFoot_Masc
A Synty Polygon Masculine animation clip: walk into IdleF RFoot. `LocomotionFull` (the `synty_full` preset) plays it on the Synty humanoid rig; any humanoid retargets it.
# A_Walk_Up25F_Masc
A Synty Polygon Masculine animation clip: walk Up25F. `LocomotionFull` (the `synty_full` preset) plays it on the Synty humanoid rig; any humanoid retargets it.
# Polygon Synty Character
A low-poly rigged humanoid character (Synty POLYGON style) bundled for the
character-controller system — a ready-to-drive sample body with its skeleton,
so the controller has a real avatar to move, animate, and test against.
Decomposed from `PolygonSyntyCharacter.fbx`.
## Composition
- Root `PolygonSyntyCharacter` with the imported node hierarchy.
- Carries the skinned character mesh and its `.rig` (skeleton) as subassets.
## Usage
Referenced by the character-controller package as its default humanoid body;
spawn it and attach a controller to walk it around.
# flight.inputMap
Vertical movement for a player that flies or swims: `flyUp` and `flyDown`.
The map composes — activate it beside the standard scheme and the player
gains two controls, release it and they lose exactly those two. Its group is
`player`, so a vehicle or a menu that stands the player down stands these
down too.
- **flyUp** — `E` or `Space`, the right trigger, or a lower-right touch
button.
- **flyDown** — `Q`, `Ctrl` or `Shift`, the left trigger, or a lower-right
touch button.
A controller that wants a single signed value reads both and subtracts:
```lua
local map = self.flightMap:activate()
map.flyUp:onInput(function(_, dt, active) self.up = active end)
map.flyDown:onInput(function(_, dt, active) self.down = active end)
```
# floaty
> In a world that installs the Controllers library (`world.installLibrary({ world = "034d26cf-dc3d-4123-abad-3944f97c6a60", as = "controllers" })`), every package name on this page is written with `@controllers::` in front of it, and `asset.list("component")` lists each one under that name.
A light platformer CharacterController: the walk speeds up at 25 m/s² and slides a little into a stop at 15 m/s² braking; a full jump rises 2.5 m with its top 0.6 s after take-off, let go at take-off it rises 0.3 m, so a quick tap, held a few frames into a jump this fast, is a hop well under a metre, and it drifts down at 0.6 times gravity, no faster than 6 m/s, steering hard in the air.
```luau
preset.apply("characterController.presets.floaty", { entity = id, component = "CharacterController" })
```
The CharacterController README's "Movement feel" section states what each
field does.
# humanoid
Baseline speeds and idle/walk/run clips, named by leaf identity, for the
`Locomotion` component on a generic humanoid rig. Replace the clip names
with your character pack's.
```luau
preset.apply("humanoid", { entity = id, component = "Locomotion" })
```
# instant
> In a world that installs the Controllers library (`world.installLibrary({ world = "034d26cf-dc3d-4123-abad-3944f97c6a60", as = "controllers" })`), every package name on this page is written with `@controllers::` in front of it, and `asset.list("component")` lists each one under that name.
A CharacterController that answers on the frame it is asked: the walk starts, stops and reverses with no ramp, the jump takes off at `jumpForce` against the character's gravity and rises its full height however it is pressed, and the fall is neither scaled nor capped.
```luau
preset.apply("characterController.presets.instant", { entity = id, component = "CharacterController" })
```
The CharacterController README's "Movement feel" section states what each
field does.
# responsive
> In a world that installs the Controllers library (`world.installLibrary({ world = "034d26cf-dc3d-4123-abad-3944f97c6a60", as = "controllers" })`), every package name on this page is written with `@controllers::` in front of it, and `asset.list("component")` lists each one under that name.
A quick, crisp CharacterController: the walk speeds up at 40 m/s² and brakes at 50 m/s², a full jump rises 1.3 m with its top 0.38 s after take-off, let go at take-off it rises 0.25 m, so a quick tap is a hop of about half a metre, and it falls at 1.6 times gravity, no faster than 20 m/s, with strong air control.
```luau
preset.apply("characterController.presets.responsive", { entity = id, component = "CharacterController" })
```
The CharacterController README's "Movement feel" section states what each
field does.
# synty
Locomotion speeds and the Synty Polygon Masculine clip set for the
`Locomotion` component: walk, run and sprint thresholds, an idle, and
four-direction walk and run clips plus a forward sprint, and the take-off,
fall and landing clips the air states play.
```luau
preset.apply("synty", { entity = id, component = "Locomotion" })
```
# synty_full
Locomotion speeds and all 87 in-place Synty Polygon Masculine clips for the
`LocomotionFull` component: idle, walk/run/sprint/crouch direction variants,
shuffle, turn, in-air, and start/stop transitions.
```luau
preset.apply("synty_full", { entity = id, component = "LocomotionFull" })
```
# weighty
> In a world that installs the Controllers library (`world.installLibrary({ world = "034d26cf-dc3d-4123-abad-3944f97c6a60", as = "controllers" })`), every package name on this page is written with `@controllers::` in front of it, and `asset.list("component")` lists each one under that name.
A heavy CharacterController (an armoured knight, a brute): the walk builds up and brakes at 6 m/s², so it takes its time to get going, stop and turn (half a second to stop from a 3 m/s walk); a jump rises 0.8 m with its top 0.36 s after take-off, the same height however it is pressed, and it falls at twice gravity, no faster than 25 m/s, with little air control.
```luau
preset.apply("characterController.presets.weighty", { entity = id, component = "CharacterController" })
```
The CharacterController README's "Movement feel" section states what each
field does.
# controllers_character
Tests for the characterController package of the Controllers world: the
CharacterController walks and jumps a body on a floor, Physics reaches it
through the bodyMover contract, `characterController.install` puts this
package's components on an entity, and the Synty presets name the clips the
package holds. Run it in an engine bound to the Controllers world, or a world
that installs it: `asset.resolve("controllers_character", "testSuite"):run()`.