# defaults
> 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.
Default configuration presets for the character controller. Each
preset is a flat `Config` table that `CharacterController.attach` /
`install` merges over with user overrides. No behaviour, no state —
just constants.
## Exports
- `M.standard: Config` — baseline humanoid tuning. Used when no user
config is supplied to `attach`.
- `M.platformer: Config` — higher gravity, stronger jump, double jump,
generous coyote time, high air control.
- `M.heavy: Config` — taller capsule, lower max slope, weaker jump,
minimal air control.
Types:
- `Config = { height, radius, maxSlopeAngle, stepHeight, gravity, jumpForce, coyoteTime, jumpBuffer, maxJumps, airControlFactor, groundSnapDistance, stepSmoothing, skinWidth }`
## Usage
```luau
local Defaults = require("characterController.characterController.data.defaults")
-- Use a preset directly:
CharacterController.attach(entityId, Defaults.platformer)
-- Or merge selective overrides:
local cfg = {}
for k, v in pairs(Defaults.standard) do cfg[k] = v end
cfg.jumpForce = 8.0
CharacterController.attach(entityId, cfg)
```
## Notes
- Pure data, no engine calls. Safe to require at module load time.
- These tables are shared singletons — mutating `Defaults.standard`
in place will affect every later `attach` that uses it. Copy
before mutating.
# feel
> 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 rules that give a character its feel, shared by the `CharacterController`
component and the package's character module (`Velocity.resolve` and the
state machine), so both answer the same settings the same way.
## Exports
- `Feel.DEFAULTS`: the feel a character has when nothing states another
(`acceleration` 20, `braking` 30, `jumpForce` 5, `jumpHeight` 0,
`jumpApexTime` 0, `minJumpHeight` 0, `fallGravityMultiplier` 1,
`maxFallSpeed` 0).
- `Feel.walk(vx, vz, wantX, wantZ, acceleration, braking, dt) -> (vx, vz, dx, dz)`:
the ground velocity after `dt` seconds of walking toward the request, and
the distance covered across the ground over them, exact for that motion. It
speeds up along the request at `acceleration`, slows at `braking`, sheds
the part across the request at `braking`, and brakes to a stop before a
reversal speeds up the other way. 0 for either reaches the request at once.
- `Feel.launch(settings, pull, held) -> (speed, rise)`: the take-off speed of
a jump and how it rises, from `jumpForce`, `jumpHeight`, `jumpApexTime` and
`minJumpHeight`, against the gravity `pull` (m/s², positive pulling down).
`held` says the jump was asked for with the jump control held, which makes
it one a release cuts.
- `Feel.release(vy, rise, held) -> (vy, rise)`: a jump asked for held, once
the control reads let go during its rise (on the step it takes off, for a
request let go before then), is cut to the speed that tops it out
`minJumpHeight` above where it was.
- `Feel.vertical(vy, dt, rise, pull, settings) -> (dy, vy, rise)`: one step
along up off the ground, integrated exactly: a rising jump against its own
gravity, a fall at `pull * fallGravityMultiplier`, no faster than
`maxFallSpeed`. A step crossing the top switches gravity there, so the stated
height and apex time hold at any frame rate.
- `Feel.jumpsAfter(jumpCount, maxJumps, footing) -> number?`: the jump count a
granted request leaves, or nil. On its feet or within coyote time
(`footing`) a character takes its first jump; past it the jump from the
ground counts as spent and a request takes the next jump `maxJumps` leaves.
## Usage
```luau
local Feel = require("characterController.characterController.movement.feel")
local dx, dz
vx, vz, dx, dz = Feel.walk(vx, vz, wantX, wantZ, 20, 30, dt)
local vy, rise = Feel.launch({ jumpHeight = 1.2, jumpApexTime = 0.4, minJumpHeight = 0.4 }, 9.81, true)
vy, rise = Feel.release(vy, rise, jumpHeld)
local dy
dy, vy, rise = Feel.vertical(vy, dt, rise, 9.81, { fallGravityMultiplier = 1.5, maxFallSpeed = 20 })
```