Navigation

Quick Start

Project Structure

Car Manager

Track Generator

Powerups

Game Systems

Levels

Car AI

Customization

Support

Car Handling

Wheel Rush uses a dynamic car handling system that allows the same car prefab to function either as a player-controlled car or an AI-controlled car. This is all managed by the CarTypeHandler script.


How the System Works

Each car in the game is defined by a CarTemplateSO (ScriptableObject) which contains:

When a car is spawned—either by the player or the AI—the CarTypeHandler performs the following steps:

  1. Load the car prefab from the CarTemplateSO
  2. Instantiate the shared prefab
  3. Determine the car’s role (Player or AI)
  4. Add or remove components dynamically:

This means you don’t need separate prefabs for player and AI cars.

One prefab → two behaviors.

This makes the entire car workflow:


Why This System Matters