PxVehicleSuspensionState

Defined in include/vehicle2/suspension/PxVehicleSuspensionStates.h

struct PxVehicleSuspensionState

Public Functions

inline void setToDefault(const PxReal _jounce = PX_MAX_F32, const PxReal _separation = PX_MAX_F32)

Public Members

PxReal jounce

jounce is the distance from maximum droop.

Note

jounce is positive semi-definite

Note

A value of 0.0 represents the suspension at maximum droop and zero suspension force.

Note

A value of suspensionTravelDist represents the suspension at maximum compression.

Note

jounce is clamped in range [0, suspensionTravelDist].

PxReal jounceSpeed

jounceSpeed is the rate of change of jounce.

PxReal separation

separation holds extra information about the contact state of the wheel with the ground.

If the suspension travel range is enough to place the wheel on the ground, then separation will be 0. If separation holds a negative value, then the wheel penetrates into the ground at maximum compression as well as maximum droop. The suspension would need to go beyond maximum compression (ground normal pointing in opposite direction of suspension) or beyond maximum droop (ground normal pointing in same direction as suspension) to place the wheel on the ground. In that case the separation value defines how much the wheel penetrates into the ground along the ground plane normal. This penetration may be resolved by using a constraint that simulates the effect of a bump stop. If separation holds a positive value, then the wheel does not penetrate the ground at maximum droop but can not touch the ground because the suspension would need to expand beyond max droop to reach it or because the suspension could not expand fast enough to reach the ground.