PxCreateControllerManager

Defined in include/characterkinematic/PxControllerManager.h

physx::PxControllerManager *PxCreateControllerManager(physx::PxScene &scene, bool lockingEnabled = false)

Creates the controller manager.

The character controller is informed by PxDeletionListener::onRelease() when actors or shapes are released, and updates its internal caches accordingly. If character controller movement or a call to PxControllerManager::shiftOrigin() may overlap with actor/shape releases, internal data structures must be guarded against concurrent access.

Locking guarantees thread safety in such scenarios.

By default, locking is disabled.

Note

locking may result in significant slowdown for release of actors or shapes.

Parameters
  • scene[in] PhysX scene. You can only create one PxControllerManager per scene.

  • lockingEnabled[in] Enables/disables internal locking.

Returns

New controller manager, or NULL in case of failure (e.g. when a manager has already been created for that scene)