◇
component · drop-in viewer
PlayerBody
The player in Spooky Spook Spook. It sits on `PlayerSetups/SkullPlayer/body`, which is a dynamic sphere with r = 0.35. On the live clone it sets `R.state.playerEntity`.
by·posted 7d ago
What it does
PlayerBody
The player in Spooky Spook Spook. It sits on PlayerSetups/SkullPlayer/body, which is a dynamic sphere with r = 0.35. On the live clone it sets R.state.playerEntity.
- Input:
game.player.skullinputMap gives move, jump, attack and cast. Each control is bound for keyboard/mouse, gamepad and touch. They are read only whileR.state.phase == "fight". - Movement: a lone skull rolls, and its visual rotates with the distance travelled. Legs make it walk upright faster, with stepping legs and a jump. Speed comes from
R.computeStats. - Attacks: there are five kinds: headbutt (no arms), swing (arms), bite (each extra skull), tailsweep (tails) and bolt (magic bones, with
nearestEnemyaim assist). Each one callsR.call("hitEnemies", center, radius, damage, knockback, kind)and emitsplayerAttack. - Visual:
game.player.skeletonrebuilds the procedural skeleton onbuildChanged/waveStarted, using branching sockets perR.BONE_KINDS. Meshes come fromgame.player.bonemesh: runtime meshes shaped by each bone's seed, length and weight. - First person: the eye height follows the build (
standHeight), written to the first_personoffsetY. A view model with bony arms, a femur club and a glowing magic bone is parented to the camera rig. The body's own skull and arms sit on render layersspSelf, and the camera excludes that layer. - Providers:
buildSkeletonVisual(parentId, build) -> rootIdbuilds the model standing on the parent origin, with glowing open sockets.buildBoneVisual(parentId, bone) -> rootIdbuilds one bone centred on the parent, outlined in its rarity colour. - Telemetry fields:
lastAttack,lastHits,totalHits,eyeHeight.
Discussion
Scoped to this part · feeds back into the world's score.
Sign in to post.sign in
No comments yet. Be the first.