0 votes
by
edited by
Hi edy.

I'm setting a high performance tire in a low body car configuration and getting very weird behavior. Due the problem with PhysX that you mention in the documentation, I would like to monitor the suspension compresion.

Since I can't check Telemetry (Community edition) I'm trying to get suspension compression dynamically in runtime.

I would like to know what parameters include what you named "the compression values" in the documentation and how to acces them:

"The compression values as shown in the Telemetry should never reach 1.0 or adverse physics effects may occur. This is by PhysX design/bugs and there's nothing we or Unity can do.",

I would like to keep compression under 1 but don't know how to see it.

Thanks,

Joan

1 Answer

0 votes
by
selected by
 
Best answer

WheelState.suspensionCompression is the compression ratio: 0.0 = fully elongated, 1.0 = 100% compressed.

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

Example code of accessing WheelState members:
https://vehiclephysics.com/advanced/custom-addons/#example-source-code

Still, note that the compression ratios are shown in the VPTelemetry component, also available in the Community Edition:

...