PhysxVehicleAPI#

Makes a rigid body the chassis of a PhysX vehicle whose wheels are the descendants with PhysxVehicleWheelAttachmentAPI. Listing it turns on vehicle parsing for the attach; the walkers enumerate the prims that list it, and the runtime then resolves the drive, checks which other vehicle APIs the prim lists, and validates and creates the vehicle.

  • Applies to: Xformable

  • Requires on the same prim: PhysicsRigidBodyAPI

  • Read only when listed in usd-schemas.

  • No builder: ovphysx.population and Population.hpp do not write this component; the consumer reads it when another population writes it.

Columns#

Raw fallback is the USD schema value. Producer writes is what ovstage population puts in the column for a USD stage. Parser default applies on the consumer when the column is absent, in stage units. diverges means writing the raw fallback literally parses differently from omitting the column (the parser default): USD population may well publish that very value for an unauthored attribute, so the marker is about the column being present, not about its value.

Column

Type

Units

Raw fallback

Producer writes

Parser default

If absent

physxVehicle:drive

uint64 array, RELATIONSHIP_PATH_ID

not written

No drive from the relationship: a PhysxVehicleDriveStandardAPI or PhysxVehicleDriveBasicAPI on the vehicle prim itself is the drive (both listed logs an error and the vehicle is not created); with neither the vehicle has no drive, and PhysxVehicleWheelControllerAPI on its wheel attachments is the only torque input.

usd-metadata:customData:physxVehicle:referenceFrameIsCenterOfMass

bool8

the nested customData physxVehicle -> referenceFrameIsCenterOfMass value

true

The legacy vehicle frame is the center-of-mass frame.

Interactions#

  • PhysicsRigidBodyAPI: Required on the same prim, which must also be Xformable; otherwise the runtime logs an error and the vehicle is not created. physics:rigidBodyEnabled false, or physics:kinematicEnabled true while physxVehicle:vehicleEnabled is true, also invalidates the vehicle.

Notes#

  • The runtime checks whether the vehicle prim lists PhysxVehicleMultiWheelDifferentialAPI, PhysxVehicleTankDifferentialAPI, PhysxVehicleSteeringAPI, PhysxVehicleAckermannSteeringAPI or PhysxVehicleBrakesAPI; when one is listed but its parser rejected the data, the vehicle is not created. Each of them, and PhysxVehicleControllerAPI, needs the vehicle to have a drive.

  • The runtime also reads physxVehicle:vehicleEnabled, limitSuspensionExpansionVelocity, subStepThresholdLongitudinalSpeed, lowForwardSpeedSubStepCount, highForwardSpeedSubStepCount, the four slip-denominator attributes, the sticky-tire speed, time and damping attributes, physxVehicle:suspensionLineQueryType and the customData flag physxVehicle:referenceFrameIsCenterOfMass. Live changes are applied to vehicleEnabled, limitSuspensionExpansionVelocity, the sticky-tire attributes and every slip denominator except the deprecated minLongitudinalSlipDenominator. They are not described yet.

  • At load the runtime fills the lateral sticky-tire threshold time from physxVehicle:longitudinalStickyTireThresholdTime (a historical schema mismatch), so physxVehicle:lateralStickyTireThresholdTime is not read at load and only takes effect as a live change.