Skip to content
Work in progress. These docs describe Spawnite at launch, and some parts are still being built.

CharacterControllerTrait

const CharacterControllerTrait: Trait<{ floorSnapDistance: number; gravity: boolean; gravityScale: number; groundFriction: number; height: number; jumpHeight: number; maxSlopeRadians: number; platformOnLeave: PlatformOnLeave; pushes: () => CollisionMask | null; stepHeight: number; turnWithPlatform: boolean; }>

The character controller’s settings, which moveCharacter reads each call: a game sets them on a prefab, a spawn or through characters(), changes them at run time like any trait, and overrides any of them for one call with its overrides. A character with none moves with these defaults, which are the engine’s walk as every game knows it. Predicted, so a change the room makes, such as a crouch zone that lowers height, restores exactly on her page.