<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> 💡 Bushes and rocks that burst when the character drives through them and come back on the next run. Soft props slow the character a little, solid props break only at speed.

</aside>

Subsystems

breakable-prefab.png

BreakablePropBehavior

The prop has no collider or trigger. BreakablePropController checks each physics step the distance from the character to the active props around it. Hundreds of props need no triggers or updates of their own.

Field Description
Radius Horizontal reach at scale 1. About half of the prop width.
Max Touch Height Height of the touch zone in radii. A character that flies above does not touch the prop.
Knockback Multiplier Speed multiplier after the touch.
Particle Name Name of the particle registered in ParticlesController.
Particle Scale Per Meter Burst scale for each meter of the prop width.
Sound Name Name of the audio clip in the Audio Registry.

The component implements IChunkActivatable, so the prop is registered in the controller only while its chunk is active, and IRunStateObject, so it returns on the next run.

SolidBreakableBehavior

A solid prop. Below Min Break Speed, it is an ordinary obstacle and the hit goes to the crash logic of the sled. Above the speed, the prop bursts and the character keeps most of its speed.

Field Description
Min Break Speed Speed above which the prop breaks.
Speed Loss Share of the speed that the character loses.
Particle Name, Particle Scale Per Meter, Sound Name Burst effect.

Edges of the solid props stay solid.

Prefabs

Prefabs are stored in Assets/Project Files/Game/Prefabs/Props/Summer Breakable: bushes, rocks and big rocks with the Breakable suffix.

How to add a breakable prop

  1. Duplicate a prefab. Duplicate a prefab from Summer Breakable that is close to the new prop.
  2. Replace the model. Replace the model and adjust the Radius to the prop size.
  3. Choose the effects. Set Particle Name and Sound Name. The particle must be registered in ParticlesController.
  4. Place it. Add the prefab under the Props root of the level scene.
  5. Save the scene. The save bakes the prop into a chunk.

The Level Builder places the breakable props of the generated levels. See Level Generation Tools.