Log inGet started
Package

characterController.module

Newest version

This package holds more than this page lists. See all of its files in its world.

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.