<aside> <img src="/icons/reorder_gray.svg" alt="/icons/reorder_gray.svg" width="40px" />

Navigation

</aside>

🏠 Home Page

Getting Started

Architecture

Level System

Characters & Vehicles

Run Mechanics

World Objects

Boosters & Modifiers

Progression & Economy

UI

Save & Debugging

Modules

Publishing

Reference

💰 Monetization (Ads & IAP)

<aside> 💡 A vehicle visual is a prefab with a VehicleVisualBehavior on its root. The components on the Character prefab add tracks, dust, ride sound and booster effects.

</aside>

VehicleVisualBehavior

Place the component on the root of every vehicle model.

Field Description
Seat Where the rider is placed. Each model defines its own seat height.
Spin Root Optional part that spins around its local X axis while rolling (wheel).
Propeller Optional propeller that spins around its local Z axis (airplane).
Rope Point Optional rope wrap point for models of different size. When empty, the character own rope point is used.
Track Points Optional points that leave terrain tracks, for example sled runners.
Track Width Width of one track. 0 uses the width of TerrainTrackBehavior.
Boost Points Optional points where the boost fire burns. When empty, the track points are used.

Subclasses:

Class Content
CarVisualBehavior The wheel list that the physics car is built from (one WheelCollider per entry), the body, the dust, the sparks and the skid trails.
PlaneVisualBehavior Wing tip trails that react to dives.

Visual swap by upgrade stage

A stage of the VehicleEfficiency or LauncherPower upgrade can have a Visual Prefab. When the player buys the stage, PlayerController.SetPermanentVisual replaces the model. A stage without a prefab keeps the model of the previous stage. The three tiers of each vehicle (sled_t1…t3, car_t1…t3, plane_t1…t3 and wheel_t1…t4) are such prefabs.

Rider and animation

The rider (Character Visual) is placed on the Seat of the active visual. CharacterAnimationBehavior wraps the Animator, so gameplay code calls methods and not animator parameters.

Crash effects

Behavior Effect
CharacterEjectBehavior The rider leaves the seat, flies a scripted ballistic arc, slides to a stop, sits up and waves. The run finishes after the wave.
PlaneWreckBehavior Hides the plane, throws physics copies of its parts and debris, plays an explosion. The wreck stays until the next run.

Terrain tracks

TerrainTrackBehavior paints the tracks of every wheel or runner into a mask that follows the character. The terrain shader Watermelon/Terrain Toon darkens the ground with it and Watermelon/Grass Wind presses the grass. Painting runs on the GPU. The mask is cleared on a restart.

The behavior asks the active MovementBehavior for the contacts through GetTrackContacts. Override it for a vehicle with several tracks.

Ground dust

GroundDustBehavior emits dust at the ground contact while the run is on.

Field Description
Surface Database Resolves the ground to a surface type.
Dust Prefab Particle system of the dust.
Surfaces Color, amount and an optional debris prefab for each surface type.
Size, Full Dust Speed, Min Speed Scale of the effect with the speed.

The car has its own wheel dust in CarVisualBehavior.

Ride sound

SurfaceAudioController plays a looping ride sound that matches the ground surface. It plays only while the character is grounded and moving. The volume grows with the speed.

Booster effects

BoosterVisualBehavior shows the iron skin shield and the boost fire. The fire burns at the Boost Points of the active visual and moves to the new visual after a swap.