PxVehicleWheelsSimFlag Struct Reference

Flags to configure the vehicle wheel simulation. More...

#include <PxVehicleWheels.h>

Public Types

enum  Enum { eLIMIT_SUSPENSION_EXPANSION_VELOCITY = (1 << 0), eDISABLE_INTERNAL_CYLINDER_PLANE_INTERSECTION_TEST = (1 << 1), eDISABLE_SUSPENSION_FORCE_PROJECTION = (1 << 2) }
 

Detailed Description

Flags to configure the vehicle wheel simulation.

See also
PxVehicleWheelsSimData::setFlags(), PxVehicleWheelsSimData::getFlags()

Member Enumeration Documentation

◆ Enum

Enumerator
eLIMIT_SUSPENSION_EXPANSION_VELOCITY 

Limit the suspension expansion velocity.

For extreme damping ratios, large damping forces might result in the vehicle sticking to the ground where one would rather expect to see the vehicle lift off. While it is highly recommended to use somewhat realistic damping ratios, this flag can be used to limit the velocity of the suspension. In more detail, the simulation will check whether the suspension can extend to the target length in the given simulation time step. If that is the case, the suspension force will be computed as usual, else the force will be set to zero. Enabling this feature gives a slightly more realisitic behavior at the potential cost of more easily losing control when steering the vehicle.

eDISABLE_INTERNAL_CYLINDER_PLANE_INTERSECTION_TEST 

Disable internal cylinder-plane intersection test.

By default the internal code runs a post-process on sweep results, approximating the wheel shape with a cylinder and tweaking the sweep hit results accordingly. This can produce artefacts in certain cases, in particular when the swept shape is very different from a cylinder - e.g. with swept spheres. This flag tells the system to disable this internal test, and reuse the direct user-provided sweep results.

The default code refines the sweep results in each substep. Enabling this flag makes the system partially reuse the same sweep results over each substep, which could potentially create other artefacts.

eDISABLE_SUSPENSION_FORCE_PROJECTION 

Disable suspension force projection.

By default the internal code modulates the suspension force with the contact normal, i.e. the more the contact normal is aligned with the suspension direction, the bigger the force. This can create issues when using a single blocking hit, whose unique contact normal sometimes does not accurately capture the reality of the surrounding geometry. For example it can weaken the suspension force too much, which visually makes the wheel move up and down against e.g. a kerb. Enabling this flag tells the system to disable the modulation of the suspension force by the contact normal.

The rationale is that a real tire has a deformed contact patch containing multiple normals, and even if some of these normals are bent when colliding against a kerb, there would still be a large area of the contact patch touching the ground, and getting normals aligned with the suspension. This is difficult to capture with simple sweep results, especially with a single sweep hit whose normal is computed by a less than accurate algorithm like GJK. Using this flag shortcuts these issues, which can improves the behavior when driving over kerbs or small obstacles.


The documentation for this struct was generated from the following file: