Vehicle Setup

Table of Contents

Vehicle Architecture

Every RCCP vehicle is built on a single root GameObject with the RCCP_CarController component. This acts as the central hub that lazy-loads and references all child components. The component system is modular — each subsystem (engine, gearbox, damage, etc.) lives on its own child GameObject and auto-registers with the parent controller.

Component Hierarchy

A typical RCCP vehicle looks like this in the Unity Hierarchy:


Vehicle (RCCP_CarController, Rigidbody)
  ├── RCCP_Engine
  ├── RCCP_Clutch
  ├── RCCP_Gearbox
  ├── RCCP_Differential
  ├── RCCP_Axles
  │     ├── RCCP_Axle_Front
  │     │     ├── WheelCollider_FL (RCCP_WheelCollider)
  │     │     └── WheelCollider_FR (RCCP_WheelCollider)
  │     └── RCCP_Axle_Rear
  │           ├── WheelCollider_RL (RCCP_WheelCollider)
  │           └── WheelCollider_RR (RCCP_WheelCollider)
  ├── RCCP_AeroDynamics
  ├── RCCP_Stability
  ├── RCCP_Input
  ├── RCCP_Audio
  ├── RCCP_Lights
  ├── RCCP_Particles
  ├── RCCP_Damage
  ├── RCCP_Customizer
  ├── RCCP_OtherAddons
  │     ├── RCCP_Exhausts
  │     ├── RCCP_Nos
  │     ├── RCCP_FuelTank
  │     ├── RCCP_Limiter
  │     ├── RCCP_Recorder
  │     ├── RCCP_BodyTilt
  │     ├── RCCP_WheelBlur
  │     ├── RCCP_Visual_Dashboard
  │     └── RCCP_TrailerAttacher
  └── Body (mesh renderers, colliders)

Component Base Classes

All vehicle components inherit from RCCP_Component, which provides:

Components auto-register with their parent RCCP_CarController when they initialize. Missing components are safe — accessing a component property that doesn't exist returns null rather than throwing an error.

The Included Prototype Vehicle

RCCP Lite ships with a fully configured prototype vehicle in the demo scene (RCCP_Scene_Blank_Prototype). This vehicle includes all drivetrain components, damage, customization, audio, particles, lights, and is AI-ready.

You can use this vehicle as-is for evaluation, or duplicate it to create variations.

RCCP_CarController (Main Hub)

The RCCP_CarController component is the entry point for all vehicle interaction. It exposes lazy-loaded properties for every subsystem:

Drivetrain Access

PropertyTypeDescription
EngineRCCP_EnginePower generation and RPM
ClutchRCCP_ClutchClutch engagement
GearboxRCCP_GearboxGear ratios and shifting
DifferentialsRCCP_Differential[]Power distribution
AxleManagerRCCP_AxlesAxle container
FrontAxleRCCP_AxleAuto-detected front axle
RearAxleRCCP_AxleAuto-detected rear axle
AllWheelCollidersRCCP_WheelCollider[]All wheel physics components

System Access

PropertyTypeDescription
AeroDynamicsRCCP_AeroDynamicsDownforce and drag
StabilityRCCP_StabilityABS, ESP, TCS, helpers
InputsRCCP_InputInput processing
AudioRCCP_AudioSound system
LightsRCCP_LightsVehicle lighting
DamageRCCP_DamageDamage and deformation
ParticlesRCCP_ParticlesParticle effects
CustomizerRCCP_CustomizerPaint, wheels, upgrades
OtherAddonsManagerRCCP_OtherAddonsNOS, fuel, recorder, etc.
RigidRigidbodyUnity physics body

Vehicle State

PropertyTypeDescription
speedfloatCurrent speed in km/h
absoluteSpeedfloatAbsolute speed value
engineRPMfloatCurrent engine RPM
currentGearintActive gear number
canControlboolPlayer input enabled
externalControlboolExternal controller active
engineRunningboolEngine is running
IsGroundedboolAt least one wheel on ground
directionint1 = forward, -1 = reverse

Editable in Lite

In the RCCP Lite inspector, the RCCP_CarController allows you to:

Component creation and removal buttons are disabled in Lite.

Execution Order

RCCP uses Unity's [DefaultExecutionOrder] attribute to ensure components initialize in the correct sequence:

OrderComponents
-50RCCP_SceneManager, RCCP_InputManager, RCCP_SkidmarksManager
-10RCCP_CarController
-5RCCP_Axles, RCCP_Exhausts
0All standard components (Engine, Gearbox, Stability, etc.)
+5RCCP_Camera
+10RCCP_BodyTilt, RCCP_Customizer, RCCP_Lod

This ensures that managers initialize before vehicles, vehicles before components, and visual effects run last.

Next Steps