Log inGet started
World

Builtin Library

Branchmain
Branchesmainpublish
Commit65083fe8f2

README.md

defaults

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, skinWidth }

Usage

local Defaults = require("@builtin::systems.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.