PhysxCharacterControllerAPI#
Turns a Capsule into a PhysX capsule character controller (PxCapsuleController). The walkers enumerate the prims that list it (a prim that is not a Capsule is dropped) and read slopeLimit; the other columns are read when the controller is created, after checking again that the prim lists the API.
Applies to:
CapsuleRead only when listed in
usd-schemas.Uses blocks:
prim,stage_unitsNo builder:
ovphysx.populationandPopulation.hppdo 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 |
|---|---|---|---|---|---|---|
|
float32 |
none (cosine of the steepest walkable slope) |
0.3 |
resolved USD value (authored, else raw fallback) |
0.0 diverges |
0: slope limiting off. USD resolves the unauthored attribute to 0.3 and USD population publishes it, so only a Stage that omits the column gets 0. |
|
float32 |
length |
0.1 |
resolved USD value (authored, else raw fallback) |
|
One tenth of the tolerances length (0.1 / metersPerUnit). Ambiguous-fallback collapse: a column that reads exactly 0.1 is treated as unauthored and yields the same default, so writing the raw fallback literally is equivalent to omitting the column and an offset of exactly 0.1 cannot be expressed on a non-meter stage. |
|
float32 |
length |
0.5 |
resolved USD value (authored, else raw fallback) |
0.2 * (height + 2 * radius) of the world-scaled capsule |
A fifth of the capsule’s full extent, 0.2 * (height + 2 * radius) with the world-scaled capsule height and radius. Ambiguous-fallback collapse: a column that reads exactly 0.5 is treated as unauthored and yields the same computed default. |
|
float32 |
length |
0.0 |
resolved USD value (authored, else raw fallback) |
0.0 |
0 (the PhysX default): no invisible walls around non-walkable triangles. |
|
float32 |
length |
0.0 |
resolved USD value (authored, else raw fallback) |
0.0 |
0 (the PhysX default). |
|
float32 |
none |
0.8 |
resolved USD value (authored, else raw fallback) |
0.8 |
0.8 (the PhysX default) for the underlying kinematic actor. A negative value makes PhysX reject the descriptor, so the controller is not created (a warning is logged). |
|
float32 |
none |
1.5 |
resolved USD value (authored, else raw fallback) |
1.5 |
1.5 (the PhysX default). A value below 1 makes PhysX reject the descriptor, so the controller is not created (a warning is logged). |
|
uint64, TOKEN_ID |
none |
Z |
resolved USD value (authored, else raw fallback) |
|
The stage up axis: +Y on a Y-up stage, +Z otherwise. Only the tokens X, Y and Z are matched; any other token keeps the stage axis. USD resolves the unauthored attribute to Z and USD population publishes it, so on a populated Y-up stage the controller is Z-up unless the attribute is authored. |
|
uint64, TOKEN_ID |
none |
preventClimbing |
resolved USD value (authored, else raw fallback) |
preventClimbing |
preventClimbing (the PhysX default). Accepted tokens: preventClimbing, preventClimbingForceSliding; any other token keeps the default. |
|
uint64, TOKEN_ID |
none |
easy |
resolved USD value (authored, else raw fallback) |
easy |
easy (the PhysX default). Accepted tokens: easy, constrained; any other token keeps the default. |
Interactions#
Capsule: The capsule’s radius and height, scaled by the world scale (radius by its y component, height by its z component), size the controller, and the world translation places it. Live radius and height changes set the raw attribute values without that world scale.stage_units: contactOffset defaults to 0.1 / metersPerUnit and the up direction defaults to the stage up axis.
Notes#
physxCharacterController:simulationOwner is read by the walkers by name: with more than one target the parser logs an error and uses the first, and a target that is not a created scene logs an error and the controller is not created. physxCharacterController:moveTarget is declared by the schema but not read. They are not described yet.
Character controllers are created only when some prim lists this API (listing it turns on character controller parsing for the attach). Live changes of slopeLimit, contactOffset, stepOffset, upAxis, nonWalkableMode and climbingMode are applied without the default and collapse rules above.