<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> 💡 The surface under the vehicle decides the grip, the dust, the ride sound and the track look. The Surface Database maps physics materials and terrain layers to a surface type.

</aside>

Subsystems

surface-database.png

Surface Database

Menu: Create → Data → Surface Database. The project asset is Assets/Project Files/Data/Surface Database.asset.

List Description
Material Mappings A PhysicMaterial to a SurfaceType. Works for mesh colliders and terrain colliders, because both expose their material through Collider.sharedMaterial.
Terrain Layer Mappings A TerrainLayer to a SurfaceType. A Terrain has one physics material for the whole collider, so its surface comes from the painted layer under the point.

The physics materials of the project are stored in Assets/Project Files/Game/Physics Materials: Snow, Ice, Ground Friction, Sled Body, Car Body and Wheel.

Who uses the surface type

System Use
CarMovementBehavior Grip and rolling resistance per wheel, from the Surfaces list of CarVehicleData.
GroundDustBehavior Color and amount of the dust.
SurfaceAudioController The ride sound.
TerrainTrackLookBehavior The track look of each terrain layer.

How to add a surface

  1. Add an enum value. Add the value to SurfaceType.
  2. Map the ground. Add a physics material or a terrain layer to the Surface Database with the new type.
  3. Configure the effects. Add the type to the Surfaces list of CarVehicleData and GroundDustBehavior.

Terrain tracks

Vehicles leave tracks in the terrain. See Vehicle Visuals & Surface Effects for the painting. The level side needs:

Add TerrainTrackLookBehavior to an object of the level scene. A level can use any number of layers when each tile has at most four.

Grass

GrassField draws baked grass with GPU instancing. One draw call is made for every visible chunk and mesh variant. The wind is computed in the Watermelon/Grass Wind vertex shader.

Field Description
Data GrassData asset with the baked blades. Stored in Assets/Project Files/Game/Terrain.
Variants Meshes of the grass variants.
Material Grass material.
Draw Distance Chunks beyond this distance are skipped.
Terrain Terrain that the grass grows on.

The generated levels bake their grass with Rebuild Grass. See Level Generation Tools.

Props

Level props are prefabs in Assets/Project Files/Game/Prefabs/Props:

Folder Content
Summer Trees, bushes, rocks, cliffs, ruins, fences, signs and other decor.
Summer Big Large rocks and cliffs.
Summer Breakable Bushes and rocks that burst when the character hits them. See ‣.
Landmarks, Slingshot Start and finish markers and the slingshot parts.

Keep decorative objects under the Props root of the level scene. The Level Scene Controller culls small props by distance.