Version 4 (modified by edy, 12 years ago) (diff)

--

CarTelemetry

Displays internal information from the vehicle's components (speed, acceleration, suspension, inputs...). Also shows the graphic tire telemetry (realtime friction curves) and the debugging gizmos in the Editor (force lines). It's used for debugging and fine tuning the vehicles. It doesn't have utility in games, but it's strongly recommended at the development stage for configuring and fine tuning the vehicles.

This script is added to a Main GameObject intended to hold the control scripts for the scene, together with a CarMain script.

Target: vehicle to show the telemetry from. It must contain a CarControl script. The CarMain script configures the Target to the active vehicle.

Enabled: shows or hides all the telemetry information.

Gizmos: if enabled, playing the project within the Unity Editor shows force lines at the tires. Also shows the center of mass for the vehicle. Enable the Gizmos option in the Game window.

Velocity: in addition to the forces, velocity lines at the contact point for each tire (blue) are also displayed.

Curves: shows an additional window with the graphic tire telemetry, as well as graphic suspension data.

Style: text style for the telemetry window. A fixed-width font is recommended for the data to be properly aligned.

Telemetry Data:

In the live demo the telemetry data is shown with the B key (Enabled property at the script).

WheelFL, FR, RL, RR: data for front - rear, left - right wheels

RPM: wheel spin in revs per minute.
S: spring extension. 0 is fully compressed, 1 is fully extended.
F: force supported by the spring in Newtons.
FS: tyre's forward slip (m/s)
SS: tyre's sideways slip (m/s)
FSR: tyre's forward skid ratio (<1 ok, 1..2 loosing grip, >2 skidding)
SSR: type's sideways skid ratio

Friction F, S: forward/sideways slip peak and asymptote.
Grip F, R: forward/sideways grip ratio
Stab F, R: force ratio transfered by the front - rear stabilizer bars
Steer L, R: steering angle for each wheel

Speed: forward speed in m/s, km/h and mph

Abs: absolute velocity of the rigidbody (m/s)
Lat: sideways velocity of the rigidbody (m/s)
Acc: acceleration of the rigidbody (m/s2)

Pitch: forwards angle (typically changes when accelerating and braking)
Roll: sideways angle (typically changes when steering)

AngV: pitch/roll change rate with their higher reached values

Gear: current gear, D (drive), N (neutral) or R (reverse).
Accel, Brake, Handbrake, Steer: user's input to pedals and steering wheel.
MotorMax, BrakeMax: maximum motor and braking torque applied to the wheels.

StabMode: stabilizer bars stiffness: auto, offroad, comfort, sport, none (5)
ABS: Antilock Brake System (1)
TC: Traction Control (2)
ESP: auto-steering angle limiter (3)
4x4 / front / rear: current traction axle (4)
Slow-Motion: slow time scale is enabled (T)

Tyre telemetry:

In the live demo the tire telemetry is shown with the B key (show telemetry data), then shift-B (Curves property at the script).

Forwards and sideways friction curves per each wheel, with their extremum and asymptote values. The horizontal scale is the tire slip in m/s. Forward and sideways slip values are shown in realtime:

Green: slip is ok, the extremum value has not been reached.
Yellow: slip is between extremum and asymptote. Tire force is decreasing.
Red: slip has surpassed the asymptote value. Tyre force is the minimum (skidding).

Suspension and stabilizer bars are exposed in the right-most graphs:

Wheels: the left bar shows the suspension travel, the right one the suspension force. Yellow means the suspension force has exceeded the spring value, and red means the suspension has reached its travel limit and it's fully compressed so hard contact points are created.
Stabilizer bars: the horizontal scale is the relative roll for that axle (0 = no roll, 1 = maximum roll before the inner wheel lifts from the ground) and the curve means the amount of force the stabilizer bar is exerting. Yellow means the force has exceeded the 50%, red means the force has exceeded the 75%.