Instance Method

initWithLowerAngleLimit:upperAngleLimit:

Initializes a new reach constraint object.

Declaration

- (instancetype)initWithLowerAngleLimit:(CGFloat)lowerAngleLimit upperAngleLimit:(CGFloat)upperAngleLimit;

Parameters

lowerAngleLimit

The minimum angle that the node can have when it is rotated by a reach event.

upperAngleLimit

The maximum angle that the node can have when it is rotated by a reach event.

Return Value

A newly initialized reach constraint.

Discussion

When a reach action is executed, a node’s zRotation property may be changed by the action to satisfy the reach action. Any value calculated by the reach action for a node is always inside the range specified by the reach constraint attached to the node’s reachConstraints property.

See Also

Working with Reach Constraints

lowerAngleLimit

The minimum angle that the node can have after it is rotated by a reach event.

upperAngleLimit

The maximum angle that the node can have after it is rotated by a reach event.