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

CharacterSpawnProps

What a scene’s CharacterSpawn is given, and what each plugin’s onCharacterSpawn reads as a character appears. A plugin adds its own fields by augmenting it: declare module "@spawnite/engine" { interface CharacterSpawnProps { wardenClass?: string } }. The body fields are the character’s at spawn: the physics cuts its capsule to them, and the controller climbs, steps and jumps by controller.

Property Type Default value Description Overrides
abilities? readonly AbilityHandle[] undefined - -
avatar? string undefined The character’s avatar, a name registerAvatar registered, drawn over a model or a primitive on every page. Every avatar plays the same clips. -
bagSlots? number undefined - -
carryCapacity? number undefined - -
carryMix? CargoMix undefined - -
carryPlacement? CarrierPlacement undefined - -
children? CharacterOverlay undefined Drawn inside the character’s model, so it follows the character: a game’s bar over its head. -
collisionMask? CollisionMask | null every layer The layers its sweeps and contacts meet, null for every one. A chaser’s default leaves out both of the characters’ layers; a game lists characters.collisionLayers.players again for a body that blocks the character. -
color? ColorRepresentation blue The colour of the character’s primitive. -
controller? Partial<{ floorSnapDistance: number; gravity: boolean; gravityScale: number; groundFriction: number; height: number; heldPassSeconds: number; jumpHeight: number; maxSlopeRadians: number; plane: Side | null; platformOnLeave: PlatformOnLeave; pushes: CollisionMask | null; separationSpeed: number; stepHeight: number; turnWithPlatform: boolean; }> undefined The character controller’s settings it starts with, each laid over its defaults: its step, its steepest slope, its jump’s height and the rest of CharacterControllerTrait. -
facing? number 0 Radians about y at spawn; zero is the rest direction. -
footsteps? readonly string[] undefined Files, ?url imports, one played at random each stride the character walks. -
health? object { current: 100, maximum: 100 } The character’s health at spawn: full unless a save says otherwise. maximum is the base of its maxHealth stat. -
health.current number undefined - -
health.maximum number undefined - -
height? number 1.4 Metres above the feet the head stands. Never the character’s model’s. Partial.height
localPlayerRing? LocalPlayerRingSetting false A soft ring on the ground under the local player’s own character, never another player’s or an NPC’s, so the player finds their character among look-alikes from a far camera, as League of Legends rings the player’s own champion. true draws the engine’s ring, options tune it. Off by default, as Roblox, Unity, Unreal and Godot draw none: a game whose camera stays close needs none. -
marker? GroundMark GroundMark.Pulse What marks the ground where a walk ends: a pulse of light, a ring, another mark of light, or nothing. -
model? string undefined The name of a registered model it wears where no avatar is named, or where a page cannot draw it. Where its file has clips, it plays the ones its pose asks for: idle at rest, walk and run blended by its speed, and jump off the ground, as ModelClip names them, and each clip playClip asks of it over them. Its clip names, clip speeds and material are its registration’s. -
movement? Partial<{ acceleration: number; airControl: number; coyoteSeconds: number; deceleration: number; dropThroughInput: DropThroughInput; maxTurnSeconds: number; speed: number; standingShare: number; standTurnRate: number; turnAngleRadians: number; turnInPlace: boolean; turnRate: number; }> undefined The character’s movement settings, each laid over the preset’s: its speed, how fast it gets up to it and stops, and how it turns, as Movement describes each. -
nameplate? NameplateSetting true The name over each other player’s head, never the local player’s own: the engine’s plate unless set, with a mic while that player speaks. false draws none, options tune the engine’s plate, and a component draws each plate itself from the same props, as Roblox’s name display and Fortnite’s nameplate settings let a creator do. -
playerAvatar? boolean false Whether the avatar a player brings, the one the player’s join names, goes over the look these props name: the look stays for a player who brings none. Left out, the game’s look wins, and a game that names no look dresses each player in their own avatar, as Roblox does where no StarterCharacter replaces it. -
position? [number, number, number] [0, 0, 0] Where the player spawns. The first step stands the player on the ground. -
preset? "realistic" | MovementPreset | "responsive" MovementPreset.Responsive The movement settings it starts from: responsive unless named. Its value’s text too, so preset="realistic" reads as the enum does. -
radius? number 0.35 Metres from the axis to the side. Never the character’s model’s. Partial.radius
resources? readonly ResourceHandle[] undefined - -
respawn? false | RespawnOptions { seconds: 5, at: RespawnPlace.Spawn } Whether the character comes back once its health runs out, after how many seconds and where, as Roblox’s Players.RespawnTime sets it. With false it stays down, with the DownedTrait trait, for the game’s own flow to get up, such as a revive. -
shape? "box" | "sphere" | "capsule" | PlaceholderShape PlaceholderShape.Capsule The primitive it wears when neither an avatar nor a model is named. -
stats? Record<string, { base?: number; modifiers: object[]; }> undefined The character’s stats at spawn, from a save: each stat’s base and its modifiers. The maxHealth stat’s base is health.maximum. -
weapons? readonly string[] undefined The weapons the character starts holding, by the names registerWeapon gives them, as Roblox’s StarterPack hands each player their tools. A room refuses a shot from any other from the moment the character spawns. A game’s own system changes the list as the character buys or swaps a weapon. Left out, it holds every registered weapon. Read by weapons(). -