RoverBuild
The geometry of CINNAMON. One call stands the whole vehicle and hands back the handles that get animated.
RoverBuild
The geometry of CINNAMON. One call stands the whole vehicle and hands back the handles that get animated.
local RoverBuild = require("game.rover.RoverBuild")
local rig = RoverBuild.build(someEntity)
rig carries root, chassis, wheels (six { steer, spin, x, z }),
wheelRadius, flames, dust, gauge, beacon, lamps, lampLights,
pane, saplings and voice.
How it is put together
The rover faces north, which is local +Z, and stands on local y = 0.
root— everything hangs off this, namedcinnamon_rig. Despawn it to take the whole vehicle down.chassis— the sprung mass. The hull, the deck, the cargo crate and the thrusters are on it, so bobbing and leaning the chassis moves all of them.- wheels — siblings of the chassis, not children, so they stay on the
ground while it travels. Each is a
steernode (yaw) over aspinnode (roll about its own axis), and the grousers around each tread are what make a rolling wheel read as rolling. - rockers — a beam over each side's three hubs with uprights down to them and ties up into the hull.
Every part is spawned temporary, so nothing the vehicle is made of is written
into the scene record: the component rebuilds it on every load and hot reload.
Materials
Sixteen materials under materials/, all on the pbr shader and all reading the
game's palette: gold mylar foil and its creases, aluminium clean and
dust-worn, dark chassis, tyre rubber, polished hubs, radiator white, cinnamon
paint, leaf and soil, and the five that carry their own light — headlamp,
xylidine gauge, hazard beacon, crate grow strip and thruster flame.
None of them is fully metallic. A metal with nothing to reflect renders as a dark surface, and the light on this Moon is one grazing sun and an earthlit sky, so every metal here keeps a diffuse term.
Scoped to this part · feeds back into the world's score.