0 votes
by

I want to read the Fx and Fy values that are displayed in the Force section in the Telemetry window:

1 Answer

0 votes
by
edited by
 
Best answer
using VehiclePhysics;

VehicleBase.WheelState ws = vehicle.wheelState[wheelIndex];
float forwardForce = ws.tireForce.y;
float sidewaysForce = ws.tireForce.x;

wheelIndex is the index of the wheel. Wheels are indexed left to right, then front to rear. In standard 4-wheeled cars front wheels are 0, 1 (left, right) and rear wheels are 2, 3.

The reference of the class VehicleBase.WheelState with all the exposed values is here:

https://vehiclephysics.com/advanced/vehiclebase-reference/#nested-classes

...