PxCloneDynamic#

Defined in include/extensions/PxSimpleFactory.h

PxRigidDynamic *PxCloneDynamic(
PxPhysics &physicsSDK,
const PxTransform &transform,
const PxRigidDynamic &body,
)#

create a dynamic body by copying attributes from an existing body

The following properties are copied:

  • shapes

  • actor flags, rigidDynamic flags and rigidDynamic lock flags

  • mass, moment of inertia, and center of mass frame

  • linear and angular velocity

  • linear and angular damping

  • maximum linear velocity

  • maximum angular velocity

  • position and velocity solver iterations

  • maximum depenetration velocity

  • sleep threshold

  • contact report threshold

  • dominance group

  • owner client and client behavior bits

  • name pointer

  • kinematic target

The following are not copied and retain their default values:

  • name

  • joints or observers

  • aggregate or scene membership

  • sleep timer

  • user data

Note

Transforms are not copied with bit-exact accuracy.

Parameters:
  • physicsSDK[in] PxPhysics - the physics SDK used to allocate the rigid static

  • body[in] the rigid dynamic to clone.

  • transform[in] the transform of the new dynamic

Returns:

the newly-created rigid static