PxCreateDynamic

Defined in include/extensions/PxSimpleFactory.h

PxRigidDynamic *PxCreateDynamic(PxPhysics &sdk, const PxTransform &transform, const PxGeometry &geometry, PxMaterial &material, PxReal density, const PxTransform &shapeOffset = PxTransform(PxIdentity))

simple method to create a PxRigidDynamic actor with a single PxShape.

Parameters
  • sdk – [in] the PxPhysics object

  • transform – [in] the global pose of the new object

  • geometry – [in] the geometry of the new object’s shape, which must be a sphere, capsule, box or convex

  • material – [in] the material for the new object’s shape

  • density – [in] the density of the new object. Must be greater than zero.

  • shapeOffset – [in] an optional offset for the new shape, defaults to identity

Returns

a new dynamic actor with the PxRigidBodyFlag, or NULL if it could not be constructed