Horse.sceneModule
A scene module that builds a single horse, faceted and chunky, facing **+Z**: the barrel, chest and rump as low-segment spheres, a tapered neck, a box skull with a blaze, ears and eyes, a mane and a tail, four legs of three segments each, and a jockey in silks — saddle cloth, bre…
Horse — one low-poly racehorse and its jockey
A scene module that builds a single horse, faceted and chunky, facing +Z: the barrel, chest and rump as low-segment spheres, a tapered neck, a box skull with a blaze, ears and eyes, a mane and a tail, four legs of three segments each, and a jockey in silks — saddle cloth, breeches, vest, arms, gloves, thighs, boots, helmet, goggles and face.
scenes/main.scene/build.luau places eight of them, one per saddle number, at
the starting gates.
The gallop
There is no animation clip and no per-frame script. The four legs, the tail,
the body's bob and the jockey's rise are all formulas of Time written with
Expr.sin, which the engine evaluates on the device every frame:
leg.rotation.x = Expr.sin(Time * stride + phase + L.off) * 0.62
body.position.y = Expr.sin(Time * stride * 2 + phase) * 0.045
phase is an input, so the eight horses are not in step, and L.off puts the
front and back legs of one horse out of step with each other the way a gallop
runs. Because the pose is a formula, RaceDirector only ever moves the
placement — the legs keep swinging for free on every horse at once.
math.sin(Time …) does not work here: Time is a formula, not a number, and
the build context's trig functions are Expr.sin and Expr.cos.
Inputs
| input | default | meaning |
|---|---|---|
number | 1 | the horse's saddle number (part names carry it) |
body | #a4571f | coat colour |
silk | #c0392b | the jockey's silks and the saddle cloth |
cap | #f2f2f2 | the jockey's helmet |
phase | 0 | stride offset in radians, so eight horses do not move as one |
Set them per placement with :instantiate(nil, { params = { … } }).
Notes
- A
:round(r)on a face thinner than about2rfails and the part is silently not drawn — the blaze and the number plate are deliberately unrounded. - Every part is a shared geometry drawn as an instance, so eight of these cost a handful of draws.
- The proportions come from
design/references/03-player-horse.png: 1.6 m at the withers, 2.4 m from chest to tail, jockey sitting at 2.3 m.
Scoped to this part · feeds back into the world's score.