Navigation
API > API/Runtime > API/Runtime/Engine > API/Runtime/Engine/FAnimPhys
Description
Constraint two bodies together with angular limits, limiting the relative rotation between them. Note that this allows TWO axes to rotate, the twist axis will always be locked
| Name | ConstrainAngularRange |
| Type | function |
| Header File | /Engine/Source/Runtime/Engine/Public/Animation/AnimPhysicsSolver.h |
| Include Path | #include "Animation/AnimPhysicsSolver.h" |
| Source | /Engine/Source/Runtime/Engine/Private/Animation/AnimPhysicsSolver.cpp |
static void ConstrainAngularRange
(
float DeltaTime,
TArray < FAnimPhysAngularLimit > & LimitContainer,
FAnimPhysRigidBody * FirstBody,
FAnimPhysRigidBody * SecondBody,
const FQuat & JointFrame,
AnimPhysTwistAxis TwistAxis,
const FVector & JointLimitMin,
const FVector & JointLimitMax,
float InJointBias
)
Parameters
| Name | Remarks |
|---|---|
| LimitContainer | Container to add limits to |
| FirstBody | First body in the constraint (or nullptr for world) |
| SecondBody | Second body in constraint |
| JointFrame | Frame/Rotation of the joint |
| TwistAxis | The axis to regard as the twist axis |
| JointLimitMin | Minimum limits along each axis (twist axis ignored) |
| JointLimitMax | Maximum limits along each axis (twist axis ignored) |
| InJointBias | Bias towards second body's forces (1.0f = 100%) |