CharactersOptions
What characters() takes.
Properties
Section titled “Properties”| Property | Type | Description |
|---|---|---|
autoSpawn? |
boolean |
Whether each player gets a character once the player’s save has restored, at the player’s seat’s spawn point as the scene’s <CharacterSpawn> names it: true when left out. False for a game that spawns its players’ characters itself with spawnCharacter, such as from a saved choice of class or a lobby’s match start. |
capsule? |
Partial<{ collisionMask: CollisionMask | null; height: number; radius: number; }> |
The capsule each player’s character is cut to, laid over the engine’s 0.35 m by 1.4 m: the same for every player, whatever avatar the character wears. The scene’s <CharacterSpawn> sets its own radius, height and collisionMask over these. |
collidesWithCharacters? |
boolean |
Whether players’ characters block one another: true when left out. False leaves characters.collisionLayers.players out of each player’s capsule’s mask, so players walk through each other, as most Roblox obbies do, while NPCs and the world still block them. A capsule’s own collisionMask, on the <CharacterSpawn> or a spawnCharacter call, wins over it, and every other character keeps the mask its own capsule names. |
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; }> |
The character controller’s settings each player’s character spawns with, laid over the engine’s: the character’s step, the character’s steepest slope, the character’s jump’s height and the rest of CharacterControllerTrait. The scene’s <CharacterSpawn> lays its own controller over these. |
keys? |
CharacterKeys |
The keys the character walks and jumps on, each left out keeping its default: W, A, S and D with the arrows, and Space. jump: [] drops the jump’s key, for a game that gives Space to something else. |
movement? |
MovementPreset | 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; }> |
How each player’s character runs, stops, turns and jumps off a ledge: a preset’s name, or settings laid over the engine’s, each left out keeping its default. The scene’s <CharacterSpawn> lays its own movement over these, and its preset replaces them. An airControl below 0, or one that is not finite, throws; above 1 steers the character faster in the air than on the ground. |
outOfWorld? |
OutOfWorldEffect |
What a living player’s character does once it falls below the scene’s killBelowHeight, definePhysics’, and no system put the character back above it on its FellOutOfWorldEvent. OutOfWorldEffect.Die applies when left out, with no killer and DeathCause.FellOutOfWorld, then its respawn brings it back. Respawn stands the character at once where a respawn would, alive; None leaves the character to the game. Any other character, an NPC, is destroyed as a body is. |
poseTolerance? |
Partial<PoseTolerance> |
How far the player’s page’s pose of the player’s character may differ from the room’s and still count as the same, in a room: each part left out takes defaultPoseTolerance’s. The control the plugin makes for the character it spawns for the player carries it, as control’s own poseTolerance does. |
restorePlace? |
boolean |
Whether the character’s saved place restores where points are placed for the player’s team: false when left out, since a place from another match could stand in the enemy’s half. True for a persistent world with factions. The rest of the player’s saved entity restores either way. |
smoothing? |
Partial<CorrectionSmoothing> |
How the player’s page draws a correction of the player’s character, in a room: each part left out takes defaultCorrectionSmoothing’s. The control the plugin makes for the character it spawns for the player carries it, as control’s own smoothing does; a game that calls control on the player’s character itself names its own. |
spawnRadius? |
number |
Metres round a spawn point another character stands on within which a character takes the nearest free place instead, on rings about 1.5 m apart: clear of every character, on a floor, and reached from the point with no wall between. 12 when left out, which holds about 200 players at the default capsule on open ground. 0 stands every character on the point itself, where they push apart, as Roblox stacks characters on a full SpawnLocation. Arma Reforger names the same “Spawn Radius”. It applies round the scene’s <CharacterSpawn>, a placed or team point once every point is taken, a player’s respawn point and a respawn’s point; a position a game passes spawnCharacter or teleport stands where it says. |
spawnWithoutTeam? |
boolean |
Whether a player with no team gets a character in a game with teams: false when left out, so the player waits for a team, as Counter-Strike’s unassigned player has no body, and isWaitingForTeam reads true. True spawns the character on the points placed for no team, an ally of nobody. |
teamChange? |
TeamChangeEffect |
What a living player’s character does when the player’s own switch, or a balance, changes the player’s team: TeamChangeEffect.Die when left out, with no killer and DeathCause.TeamChange. Then the character’s respawn brings the character back on the player’s new team’s points. Respawn stands the character there at once, alive; Stay leaves the character where it stands. A game’s own setTeam always leaves the character standing. |
touch? |
false | CharacterTouch |
The stick and the Jump button the engine draws on a phone, each left out keeping its default; false drops both, for a game that draws its own, and { jump: false } drops the button alone. A jump with no keys draws no button unless this names one. |
view? |
CharacterViewComponent |
The view every character draws with, on every page, alone and in a room, players’ and NPCs’: a component handed the character and the game’s overlay, drawn where the character stands. Left out, the engine’s CharacterView, which a game’s view may draw inside it to keep the engine’s body. A prefab’s view, or a view defineTraitView registered for a trait the character holds, still wins for the character. As Unity’s player prefab and Roblox’s StarterCharacter. |