Telemetry and Debug

Table of Contents

Overview

Realistic Car Controller Pro includes built-in telemetry and input debug overlays that display real-time vehicle data during play mode. These tools help you tune vehicle parameters, diagnose handling problems, and verify that inputs are reaching the vehicle correctly.

There are two independent overlays:

Both are disabled by default and intended for development use only. You do not need to add any components manually -- RCCP instantiates the telemetry prefab automatically when the setting is enabled.

Enabling the Overlays

Open the RCCP Settings window from the Unity menu:

Tools > BoneCracker Games > Realistic Car Controller Pro > Settings

Scroll to the Units section to find the debug overlay toggles:

SettingFieldDefaultDescription
Use TelemetryRCCP_Settings.useTelemetryOffShows a real-time vehicle data overlay at runtime (speed, RPM, gear, forces, slip values).
Use Input DebuggerRCCP_Settings.useInputDebuggerOffDisplays input-related notifications on screen at runtime (gear shifts, light toggles, stability system changes).

You can also toggle these from code:


RCCP_Settings.Instance.useTelemetry = true;
RCCP_Settings.Instance.useInputDebugger = true;

Important: The telemetry prefab is instantiated by RCCP_SceneManager during its OnEnable. If you change the setting at runtime after the scene has already loaded, the telemetry panel will not appear until the next scene load. For runtime toggling, enable the setting before entering play mode.

Telemetry Display

The RCCP_Telemetry component is a Canvas-based UI overlay that reads data directly from the active player vehicle every frame. It is attached to the telemetry prefab located at:


Assets/Realistic Car Controller Pro/Prefabs/UI/RCCP_Telemetry.prefab

The prefab reference is stored in RCCP_Settings.RCCPTelemetry. When useTelemetry is enabled, RCCP_SceneManager instantiates this prefab automatically at scene start.

How It Works

Each frame, RCCP_Telemetry.Update() reads the active player vehicle via RCCP_SceneManager.activePlayerVehicle and updates all UI Text elements. If no active player vehicle exists, the display goes blank. When you switch vehicles, the telemetry automatically follows the new active vehicle.

Per-Wheel Data

The telemetry panel shows data for up to four wheels. Each wheel panel displays the following values:

FieldSourceUnitDescription
NameWheelCollider.name--The name of the WheelCollider GameObject.
RPMWheelCollider.rpmRPMCurrent rotational speed of the wheel.
TorqueWheelCollider.motorTorqueNmMotor torque currently applied to the wheel.
BrakeWheelCollider.brakeTorqueNmBrake torque currently applied to the wheel.
ForceRCCP_WheelCollider.bumpForceNSuspension bump force acting on the wheel.
AngleWheelCollider.steerAngleDegreesCurrent steering angle of the wheel.
Slip_SdRCCP_WheelCollider.SidewaysSlip--Sideways (lateral) slip value. Higher values mean more sliding.
Slip_FwdRCCP_WheelCollider.ForwardSlip--Forward (longitudinal) slip value. Higher values mean more wheelspin or lockup.
HitwheelHit.collider.name--Name of the collider the wheel is currently touching. Empty if airborne.

Note: Even if your vehicle has more than four wheels, the telemetry panel displays data for the first four only.

Vehicle Status

Below the wheel panels, the telemetry displays overall vehicle state:

FieldSourceUnitDescription
ABSRCCP_Stability.ABSEngaged--"Engaged" or "Not Engaged". Shows "Not Equipped" if no Stability component.
ESPRCCP_Stability.ESPEngaged--"Engaged" or "Not Engaged". This is the raw ESP state — true the moment ESP decides to intervene, including micro-corrections. For a driver-facing dashboard light, use ESPIndicatorEngaged instead (see below). Shows "Not Equipped" if no Stability component.
TCSRCCP_Stability.TCSEngaged--"Engaged" or "Not Engaged". Shows "Not Equipped" if no Stability component.
Wheel Speed AveragecarController.wheelRPM2Speedkm/hAverage speed derived from wheel RPM.
SpeedcarController.speedkm/hPhysical speed of the Rigidbody (signed value).
Engine RPMcarController.engineRPMRPMCurrent engine revolutions per minute.
Final TorquecarController.producedDifferentialTorqueNmTorque output from the differential to the driven wheels.
GearcarController.currentGear--Current gear number (1, 2, 3...), "N" for neutral, or "R" for reverse.
ControllablecarController.IsControllableByPlayer()--"True" if the player can currently control this vehicle.

Input Channels

The telemetry panel shows two columns of input values -- player inputs (raw input from keyboard, gamepad, or mobile) and vehicle inputs (the values actually applied to the vehicle after processing):

Player InputVehicle InputRangeDescription
Player ThrottleVehicle Throttle0.0 -- 1.0Accelerator input.
Player SteerVehicle Steer-1.0 -- 1.0Steering input (negative = left, positive = right).
Player BrakeVehicle Brake0.0 -- 1.0Brake pedal input.
Player HandbrakeVehicle Handbrake0.0 -- 1.0Handbrake/parking brake input.
Player ClutchVehicle Clutch0.0 -- 1.0Clutch pedal input.

The difference between player and vehicle inputs helps you diagnose issues where input processing (smoothing, clamping, or override systems) may be altering the raw player input before it reaches the drivetrain.

Input Debugger

The input debugger is a notification-based system rather than a persistent display. When enabled, it fires RCCP_Events.Event_OnRCCPUIInformer messages whenever the player triggers an input action. These messages appear briefly on screen via the RCCP_UI_Informer component (included in the RCCP Canvas prefab).

Logged Actions

The input debugger logs the following actions:

ActionExample Message
Gear shift up"Shifted Up"
Gear shift down"Shifted Down"
Shift to specific gear"Shifted To: 3"
Start/stop engine"Starting Engine" / "Killing Engine" / "Stopped Engine"
Toggle low beam lights"Switched Low Beam Lights To True"
Toggle high beam lights"Switched High Beam Lights To True"
Toggle left indicators"Switched Left Indicators To True"
Toggle right indicators"Switched Right Indicators To True"
Toggle all indicators"Switched All Indicators To True"
Toggle ABS"Switched ABS To True"
Toggle ESP"Switched ESP To True"
Toggle TCS"Switched TCS To True"
Toggle steering helper"Switched Steering Helper To True"
Toggle traction helper"Switched Traction Helper To True"
Toggle angular drag helper"Switched Angular Drag Helper To True"

Each message appears for a few seconds and then fades out. This is useful for verifying that gamepad buttons, keyboard keys, or mobile UI buttons are correctly triggering vehicle actions.

Reading Vehicle Data in Code

You do not need the telemetry UI to read vehicle data at runtime. All telemetry values are public properties on RCCP_CarController that you can access directly from any script:


// Get the active player vehicle
RCCP_CarController vehicle = RCCP_SceneManager.Instance.activePlayerVehicle;

// Basic vehicle state
float speed = vehicle.speed;                        // km/h (signed)
float rpm = vehicle.engineRPM;                      // engine RPM
int gear = vehicle.currentGear;                     // current gear index
int direction = vehicle.direction;                  // 1 = forward, -1 = reverse
bool isGrounded = vehicle.IsGrounded;               // true if any wheel is on the ground
float wheelSpeed = vehicle.wheelRPM2Speed;          // average wheel speed in km/h
float diffTorque = vehicle.producedDifferentialTorque; // differential output torque

// Player inputs (raw from input device)
float throttleP = vehicle.throttleInput_P;          // 0..1
float steerP = vehicle.steerInput_P;                // -1..1
float brakeP = vehicle.brakeInput_P;                // 0..1
float handbrakeP = vehicle.handbrakeInput_P;        // 0..1
float clutchP = vehicle.clutchInput_P;              // 0..1

// Vehicle inputs (processed values applied to drivetrain)
float throttleV = vehicle.throttleInput_V;          // 0..1
float steerV = vehicle.steerInput_V;                // -1..1
float brakeV = vehicle.brakeInput_V;                // 0..1
float handbrakeV = vehicle.handbrakeInput_V;        // 0..1
float clutchV = vehicle.clutchInput_V;              // 0..1

// Stability system status (requires Stability component)
if (vehicle.Stability) {
    bool absActive = vehicle.Stability.ABSEngaged;

    // ESPEngaged = raw runtime state. Use this for logging, analytics,
    // driver-assist telemetry, or any decision that should react the
    // moment ESP intervenes (including micro-corrections).
    bool espActive = vehicle.Stability.ESPEngaged;

    // ESPIndicatorEngaged = debounced dashboard state. Gated by a minimum
    // brake torque (default 200 Nm) and a UI hold time (default 0.25 s)
    // so dashboard lights do not flicker on micro-corrections. Use this
    // to drive the on-screen ESP warning lamp.
    bool espDashboardLit = vehicle.Stability.ESPIndicatorEngaged;

    bool tcsActive = vehicle.Stability.TCSEngaged;

    // ESP V2 diagnostics (exposed as debug* fields for tuning/telemetry)
    float yawRef   = vehicle.Stability.debugYawRefDegS;     // reference yaw rate (deg/s)
    float yawError = vehicle.Stability.debugYawErrorDegS;   // actual - reference (deg/s, signed)
    float beta     = vehicle.Stability.debugSideslipAngleDeg; // sideslip angle β (deg)
    bool oversteering = vehicle.Stability.debugIsOversteer;
}

// Per-wheel data
foreach (RCCP_WheelCollider wc in vehicle.AllWheelColliders) {
    float wheelRPM = wc.WheelCollider.rpm;
    float motorTorque = wc.WheelCollider.motorTorque;
    float brakeTorque = wc.WheelCollider.brakeTorque;
    float steerAngle = wc.WheelCollider.steerAngle;
    float sidewaysSlip = wc.SidewaysSlip;
    float forwardSlip = wc.ForwardSlip;
    float suspensionForce = wc.bumpForce;
    bool grounded = wc.WheelCollider.isGrounded;
}

Building a Custom HUD

If the built-in telemetry panel does not fit your UI design, you can build your own using the properties shown above. A minimal speed and RPM display might look like this:


using UnityEngine;
using TMPro;

public class SimpleSpeedDisplay : MonoBehaviour {

    public TMP_Text speedText;
    public TMP_Text rpmText;

    private void Update() {

        RCCP_CarController vehicle = RCCP_SceneManager.Instance.activePlayerVehicle;

        if (!vehicle)
            return;

        speedText.text = Mathf.Abs(vehicle.speed).ToString("F0") + " km/h";
        rpmText.text = vehicle.engineRPM.ToString("F0") + " RPM";

    }

}

Common Uses

Performance Tuning

Watch the Slip_Sd (sideways slip) and Slip_Fwd (forward slip) values while driving. High sideways slip on corner entry means the tires are losing lateral grip -- consider adjusting the sideways friction curve in Ground Materials. High forward slip under acceleration indicates wheelspin -- you may want to enable or strengthen TCS, or adjust the forward friction curve.

Suspension Tuning

Monitor the Force (suspension bump force) values across all four wheels. Uneven force distribution suggests the spring rates or damper values need adjustment. If one wheel consistently shows much higher force than the others, the vehicle's center of mass may need repositioning. See Vehicle Setup for suspension configuration.

Input Debugging

If the vehicle is not responding to controls, use both overlays together:

  1. Enable the Input Debugger to confirm that key presses and button inputs are firing events.
  2. Enable the Telemetry to check whether player input values (Player Throttle, Player Steer, etc.) are non-zero.
  3. Compare player inputs to vehicle inputs -- if player values are correct but vehicle values are zero, an input override or the controllable state may be blocking input. See Overriding Inputs.

Drivetrain Verification

Use the telemetry to verify your drivetrain configuration:

Editor Debug Menu

RCCP adds three editor-only commands under Tools > BoneCracker Games > Realistic Car Controller Pro > Debug for diagnosing script execution order. These do not run at play time — they verify the project's ScriptExecutionOrder.asset against the ordering RCCP expects.

Menu ItemWhat It Does
Validate Script Execution OrderRewrites every RCCP script's execution order to the expected value and logs any mismatch found. Run this if you see erratic handling, motor-vs-brake torque fights on a driven wheel, or after manually editing project settings.
Reset Script Execution OrderClears RCCP's custom orders back to 0. Useful when debugging or handing the project to a user who wants a clean baseline.
Show Script Execution OrderPrints the current table to the Console. Use this to confirm your project matches the expected layout (see Architecture).

See Architecture Overview — Execution Order for the full table and why the -2 → -1 → 0 torque-pipeline ordering is load-bearing.

Next Steps


Support: bonecrackergames@gmail.com | www.bonecrackergames.com

Need help? See Troubleshooting