0 votes
by
edited by
I'm trying to introduce a shock absorber break simulation into my game.

For this, I want to take into account the compression speed of the shock. That is to say (it is an example) that a shock absorber that compresses 90% of its travel by 2 tenths has a greater chance of breaking than if it did so in 8 tenths of a second.

My question is...

Is there a way to get this information with VPP Professional currently?

Thanks.

1 Answer

+1 vote
by
selected by
 
Best answer

Yes. WheelState.contactSpeed is the speed of the movement of the suspension in m/s. Positive value is compression, negative value is elongation.

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

...