kaiju
Builds the Godzilla voxel model (visual only). No AI, no physics — the game moves the `GODZILLA` root kinematically and rotates the part entities to animate.
godzilla.kaiju
Builds the Godzilla voxel model (visual only). No AI, no physics — the game
moves the GODZILLA root kinematically and rotates the part entities to
animate.
API
local K = require("@root::godzilla.kaiju")
local g = K.spawn({ 0, 0, 0 })
-- g = { root = id, parts = { body, head, tail, armL, armR, legL, legR } }
K.setBreathGlow(true) -- electric-blue spike + mouth glow
K.setBreathGlow(true, { 1, 0.3, 0.1 }) -- custom color
K.setBreathGlow(false)
K.despawn()
spawn(pos)despawns any existingGODZILLAfirst, then rebuilds.posis the ground point (array or{x,y,z}map).setBreathGlow(on, color?)returnstruewhen a spawned Godzilla was updated,falsewhen nothing is spawned.
Model
~28.5 m tall, facing +z, ground at y=0. Seven VoxelShape parts (all
blockSize = 0.5) parented to the root; each part's pivot sits at its joint
so the game can rotate part entities directly:
| part | grid (voxels) | pivot | joint |
|---|---|---|---|
| body | 24 x 28 x 20 | bottom-center | hip (y 10..24) |
| head | 12 x 10 x 16 | bottom-center | neck top (y 23.5) |
| tail | 12 x 20 x 30 | {0,0,1} (hip end) | hip, droops to ~2 m |
| armL/armR | 8 x 14 x 12 | top-center | shoulder |
| legL/legR | 12 x 22 x 16 | top-center | hip |
Charcoal gray-green skin (#2e3b34), lighter belly plate bands, pale bone dorsal fins in a large central row plus two smaller side rows down neck-back-tail, amber eyes, deep open jaw with teeth and a dark-red mouth.
Breath glow
The voxel mesh renders with one shared material, so the glow is built from
small emissive Model cubes parented to the parts at the spike tips (9 on
the body, 3 on the tail) and inside the mouth, hidden by default.
setBreathGlow shows/hides them; each color gets a cached
gz_kaiju_glow_<r>_<g>_<b> pbr material (created on demand via
Material.Create, landing at /zero/source/<name>.material).
Scoped to this part · feeds back into the world's score.