Navigation
API > API/Runtime > API/Runtime/Engine > API/Runtime/Engine/FConstraintInstance
Description
Projects TargetRelRot (child frame expressed in parent-bone-local space) onto the joint's angular limits so the drive target is always feasible. Returns the clamped rotation in the same space. If bExactSwingClamp is true, uses the exact Chaos 4*atan2 swing convention to match what the physics solver enforces; otherwise a linear axis-projection approximation is used, which is cheaper but may leave a small residual at the boundary.
| Name | ClampDriveTargetToLimits |
| Type | function |
| Header File | /Engine/Source/Runtime/Engine/Classes/PhysicsEngine/ConstraintInstance.h |
| Include Path | #include "PhysicsEngine/ConstraintInstance.h" |
| Source | /Engine/Source/Runtime/Engine/Private/PhysicsEngine/ConstraintInstance.cpp |
FQuat ClampDriveTargetToLimits
(
const FQuat & TargetRelRot,
bool bExactSwingClamp
) const