constraints
TypeScriptget constraints(): IKRig_ConstraintsCollectionSwift declarationvar constraints: IKRig.ConstraintsCollectionA collection of all of the rig's constraint settings.
struct · iOS 18.0+ · SDK 27.1
struct IKRigA full body inverse kinematics rig definition for a single skeleton. Describes the skeleton, its tuning, and the active constraints for the solver instance. ### Balance of demands' weights in a full body solver The full body solver calculates the final pose by balancing the various demands based on their assigned weights. This process ensures that each demand, ranging from forward kinematics (FK) demands to constraints on joint movement, affects the pose proportionally to its importance. The solver reads the FK demands from the ``SkeletalPosesComponent``. As such these demands are either a playing animation for the model, or just a static pose. All demands have an element specific weight, and some have a global rig weight. The rig weights influence the overall rig, while element weights adjust individual aspects of the model. The table below provides detailed mappings of these weights to their respective demand types. | Demand type | Rig weight | Element weight | | ---------------------------- | ----------------------------------------- | ------------------------------------------------------------- | | FK demands | ``globalFkWeight`` | ``Joint/fkWeightPerAxis`` | | Joint rotation limits | ``globalLimitsWeight`` | ``Joint/LimitsDefinition/weight`` | | Constraint position | Not applicable | ``Constraint/IKPositionDemand/weight`` | | Constraint orientation | Not applicable | ``Constraint/IKOrientationDemand/weight`` | - Note: While constraints do not have rig weight, they have blending weight between automatic and custom targets. See ``IKComponent/Constraint/animationOverrideWeight`` for more information.
get constraints(): IKRig_ConstraintsCollectionSwift declarationvar constraints: IKRig.ConstraintsCollectionA collection of all of the rig's constraint settings.
set constraints(value: IKRig_ConstraintsCollection)Swift declarationvar constraints: IKRig.ConstraintsCollectionA collection of all of the rig's constraint settings.
get maxIterations(): numberSwift declarationvar maxIterations: IntThe maximum number of iterations the solver is allowed to do per frame. If the pose satisfies all of the demands using less iterations, the solve stops early. - Note: Values of `0` or less, result in the constant output of the last solved pose.
set maxIterations(value: number)Swift declarationvar maxIterations: IntThe maximum number of iterations the solver is allowed to do per frame. If the pose satisfies all of the demands using less iterations, the solve stops early. - Note: Values of `0` or less, result in the constant output of the last solved pose.
get globalFkWeight(): numberSwift declarationvar globalFkWeight: FloatThe solver global weight for the forward kinematics demands. This weight is a multiplier for each joint's ``Joint/fkWeightPerAxis``. The recommended value range is the closed range `[0, 1]`, where `0` means no FK demands influence, and `1` is no rig level modification.
set globalFkWeight(value: number)Swift declarationvar globalFkWeight: FloatThe solver global weight for the forward kinematics demands. This weight is a multiplier for each joint's ``Joint/fkWeightPerAxis``. The recommended value range is the closed range `[0, 1]`, where `0` means no FK demands influence, and `1` is no rig level modification.
get globalLimitsWeight(): numberSwift declarationvar globalLimitsWeight: FloatThe solver global weight for the joint rotation limits. This weight is a multiplier for each joint's ``Joint/LimitsDefinition/weight``. The recommended value range is the closed range `[0, 1]`, where `0` means no limits influence, and `1` is no rig level modification.
set globalLimitsWeight(value: number)Swift declarationvar globalLimitsWeight: FloatThe solver global weight for the joint rotation limits. This weight is a multiplier for each joint's ``Joint/LimitsDefinition/weight``. The recommended value range is the closed range `[0, 1]`, where `0` means no limits influence, and `1` is no rig level modification.
static initFor(skeleton: MeshResource_Skeleton): IKRigSwift declarationinit(for skeleton: MeshResource.Skeleton) throwsCreates an inverse kinematics rig definition for the provided skeleton. - Parameter skeleton: The rig skeleton.
static initNamedRootJoint(name: string, rootJoint: SkeletonResource_Joint): IKRigSwift declarationinit(named name: String, rootJoint: SkeletonResource.Joint) throwsCreates an IK rig from a joint hierarchy. - Parameters: - name: The name to associate with the rig. - rootJoint: The root joint of the skeleton hierarchy to derive the rig from. - Throws: If the joint hierarchy contains invalid data.
get joints(): IKRig_JointCollectionSwift declarationvar joints: IKRig.JointCollectionA collection of all of the rig's joint settings.
set joints(value: IKRig_JointCollection)Swift declarationvar joints: IKRig.JointCollectionA collection of all of the rig's joint settings.
No declarations were skipped in this snapshot.