Character Controller

A character controller (CCT) is a video-game-style movement controller that permits the player to move around a scene without being able to go through physics objects, for example a static-collider wall of a scene, or a dynamic rigid-body geometry. It is straightforward to use a CCT in a scene:

  1. Make sure that the omni.physx.cct extension is loaded.

  2. Create a capsule shape (Create > Shape > Capsule) and scale it to fit the scene. The capsule represents the player’s collision shape (other shapes are not supported).

  3. Pull up the CCT window Window > Simulation > Character Controller, and press the Activate button with the capsule-shape prim selected. This hides the capsule and gives it CCT properties.

  4. Press play and take control of the CCT to explore the scene while colliding with physics objects.

Note that creating a capsule is optional - if you activate the CCT without anything selected, one is auto-created for you.

The CCT behavior can be tweaked through Python scripting: For example, you can add a key binding and scripting to make the CCT jump. In the Window > Simulation > Demo Scenes Character Controller snippet, you can find example code for this. Another advanced example of CCT scripting is available in the Block World extension (omni.blockworld) which then adds the Block world sample to the General Samples available in the demo scenes.