PxFrictionType

Defined in include/PxSceneDesc.h

struct PxFrictionType

Enum for selecting the friction algorithm used for simulation.

PxFrictionType::ePATCH is the default friction logic (Couloumb type friction model). Friction gets computed per contact patch. Up to two contact points lying in the contact patch area are selected as friction anchors to which friction impulses are applied. If there are more than two contact points, to select anchors from, the anchors are selected using a heuristic that tries to maximize the distance between the anchors within the contact patch area. For each contact patch, two perpendicular axes of the contact patch plane are selected. A 1D-constraint along each of the two axes is used to implement friction at a friction anchor point. Note that the two axes are processed separately when the PGS solver type is selected. This can lead to asymmetries when transitioning from dynamic to static friction and vice versa in certain edge cases. The TGS solver type, on the other hand, works with the combined impulse along the two axes and as such avoids this potential problem, but this is slightly more computationally expensive. Another difference between TGS and PGS is that TGS applies friction throughout all position and all velocity iterations, while PGS by default applies friction throughout the last 3 position iterations and all velocity iterations (unless PxSceneFlag::eENABLE_FRICTION_EVERY_ITERATION is used).

PxFrictionType::eFRICTION_COUNT is the total number of friction models supported by the SDK.

Public Types

enum Enum

Values:

enumerator ePATCH

Select default patch-friction model.

enumerator eONE_DIRECTIONAL

Deprecated:

Will be removed in a future version without replacement. Please do not use.

enumerator eTWO_DIRECTIONAL

Deprecated:

Will be removed in a future version without replacement. Please do not use.

enumerator eFRICTION_COUNT

The total number of friction models supported by the SDK.