Characters
Players' own avatars if wanted (Humanoid, Avatar2D), NPCs, emotes, holding things, reaching.
- If players should appear as themselves, the engine has their avatars. In 3D, one line per seat:
world.spawn([Transform({ position }), ...Humanoid.character(seat)], { owner: seat.bot ? 'host' : seat.id }). It is a whole character (body, capsule,Character3D,Intent, name tag) that wears the look the player made on Onceworlds and walks, runs, jumps, swims, climbs and lands by itself, feet on slopes and steps, head where its player looks. It beats a stand-in figure made of boxes. - When you might not want it: players who are pieces, vehicles, creatures or a stylised character drawn the game's own way.
Then show who is who with a
NameTagand the player's colour, and keep the art direction whole. - In 2D, add
Avatar2D({ player: seat.id })to the entity that hasPlatformer2DorTopDown(view: 'head'for top-down). Its legs, arms, facing, jumps and landings follow the controller. - NPCs and bots get a look from their id:
Humanoid.character('shopkeeper'),Humanoid({ player: 'bot:3' }), or an outfit from a seed,Humanoid({ ...Humanoid.outfit('guard-2') }). Teams:look: { uniform: '#1e88e5' }colours the shirt. - Things in hands.
attach(sword, hero, 'hand.R'),'back','hat','hips'...; model the item held at the figure's side pointing forward (a blade up +y, a barrel along -z).detach(sword)drops it where it is. - Show what happens.
Humanoid.play(hero, 'wave')on the page that moves it (everyone sees it;Humanoid.emoteslists them);Humanoid.hit(hero, attacker)andHumanoid.die(hero)/reviveon every page that learns of the hit. Put dust and step sounds on thefootstepandlandsignals:hero.connect('land', (impact) => ...). - Attention.
lookAt(npc, player)turns a head toward someone;reach(hero, 'right', lever)puts a hand on a thing. Shooters:Humanoid({ aim: 'right' })holds the arm out along the camera. - glTF characters keep their
Animator:blend2dfor strafing,eventsfor footsteps and hit frames (on.hitin a node script),rootMotion: truefor clips that carry themselves.attach,lookAtandreachfind Mixamo-style bones by name. - In Build, the Humanoid node is a whole character; put a Socket node under it (its
bone, then the held thing under the Socket). The Inspector's outfit picker dresses NPCs; a player's Humanoid only needsplayerset from code when they join. - Phones. Thirty walking figures add under a millisecond to a step on a laptop.
footIK: falsesaves two short ray casts per figure per step, for crowds of NPCs.