kartFx.effect
- .metadata177 B
- README.md1.1 KB
- effect.yaml290 B
- graphs
- settings.yaml8 B
README.md
kartFx
racingKit's kart effects: boost flames from the exhaust and water spray from the wheels. Both entries are drawn in the kart's own space (front is -Z) and are meant to be played rooted on a vehiclesKit kart. Each runs until it is stopped.
| Entry | Shows | Particles |
|---|---|---|
boost | Two exhaust jets of glowing amber streaks with white-hot cores, leaving the kart's tail backwards. | 64 flame + 32 core at most |
spray | White foam droplets thrown up and back from both rear wheels, falling under gravity and spreading. | 160 at most |
No inputs: start a play when the effect should show and stop it when it should not.
local fx = asset.resolve("racingKit.kartFx", "effect")
local flames = fx:play("boost", { root = kart })
-- later
flames:stop()
The KartFx component does this for every race kart, on every peer, from the kart's synced boost and position, so you rarely need to play it yourself. A play is local to the peer that starts it.
Materials: racingKit.materials.glowAmber and racingKit.materials.glowWhite.