PxTransformFromSegment#

Defined in include/foundation/PxMathUtils.h

PxTransform PxTransformFromSegment(
const PxVec3 &p0,
const PxVec3 &p1,
PxReal *halfHeight = NULL,
)#

creates a transform from the endpoints of a segment, suitable for an actor transform for a PxCapsuleGeometry

Parameters:
  • p0[in] one end of major axis of the capsule

  • p1[in] the other end of the axis of the capsule

  • halfHeight[out] the halfHeight of the capsule. This parameter is optional.

Returns:

A PxTransform which will transform the vector (1,0,0) to the capsule axis shrunk by the halfHeight