Initializes an inverse kinematics constraint whose chain of nodes begins with the specified node.
- iOS 9.0+
- macOS 10.11+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 2.0+
The parent node of the hierarchy to be affected by the constraint.
A new constraint object.
The root node is the highest node in the hierarchy moved by the constraint. For example, a robot arm may have two arm segments and a hand connected to a body. The upper arm is a child node of the body, the lower arm is a child node of the upper arm, and the hand is a child node of the lower arm. In this case, the upper arm is the chain root node, because the body should not move to follow the hand.
The node you apply the constraint to (using that node’s
constraints property) is the end effector of the chain—the lowest node in the hierarchy. When you set the constraint’s
target property, SceneKit attempts to move this node toward the target point by rotating it relative to its parent node (and rotating its parent and ancestor nodes, up the chain ending with the
chain node). Continuing the above example, the end effector of the robot arm is its hand.