game.player.hero — assembles the procedural banana hero (game.player.parts)
under an entity and seats every piece on the rig each frame.
local rig = Hero.build(parentEntity, { softBaton = true })
Hero.pose(rig, bones) -- bones[name] = { x, y, z } in the parent's frame
Hero.setShades(rig, t) -- 0 = shades on the face, 1 = flipped off
The pieces only read bone POSITIONS, so any humanoid rig that names its bones
like the builtin one drives them without calibration.
up(t: any, prefix: string) → void
| arg | type | description |
|---|
| t | any | |
| prefix | string | |
v3(p: { number }) → any return
| arg | type | description |
|---|
| p | { number } | |
q4(q: { number }) → any return
| arg | type | description |
|---|
| q | { number } | |
place(e: any, pos: { number }, rot: { number }?, scl: { number }?) → void
| arg | type | description |
|---|
| e | any | |
| pos | { number } | |
| rot | { number }? | |
| scl | { number }? | |
build(parent: any, opts: any?) → any
| arg | type | description |
|---|
| parent | any | |
| opts | any? | |
node(name: string, par: any, pos: { number }?) → any
| arg | type | description |
|---|
| name | string | |
| par | any | |
| pos | { number }? | |
model(name: string, par: any, mesh: any, mat: string, pos: { number }?) → any
| arg | type | description |
|---|
| name | string | |
| par | any | |
| mesh | any | |
| mat | string | |
| pos | { number }? | |
hilt(par: any, tag: string, list: { any }) → void
the katana: sheathed across the back (hilt over the right shoulder), and a
second hilt + blade in the right fist, shown while it is drawn
| arg | type | description |
|---|
| par | any | |
| tag | string | |
| list | { any } | |
show(list: { any }, on: boolean) → void
| arg | type | description |
|---|
| list | { any } | |
| on | boolean | |
setWeapon(rig: any, w: string) → void
What the right fist holds: "baton" (the katana rides sheathed, hilt and
all) or "katana" (the empty saya stays on the back, the baton is put away).
| arg | type | description |
|---|
| rig | any | |
| w | string | |
pushOut(p: { number }, margin: number) → void
Push a point radially out of the banana so arms never sink into the belly.
| arg | type | description |
|---|
| p | { number } | |
| margin | number | |
handFrame(B: any, k: string, cfg: any) → void
| arg | type | description |
|---|
| B | any | |
| k | string | |
| cfg | any | |
pose(rig: any, B: any) → void
| arg | type | description |
|---|
| rig | any | |
| B | any | |
setShades(rig: any, t: number) → void
t = 0: shades on the face. t = 1: flipped up over the stem and gone.
| arg | type | description |
|---|
| rig | any | |
| t | number | |
setTint(rig: any, r: number, g: number, b: number, blend: number) → void
| arg | type | description |
|---|
| rig | any | |
| r | number | |
| g | number | |
| b | number | |
| blend | number | |