Contents

init(lowerAngleLimit:upperAngleLimit:)

Initializes a new reach constraint object.

Declaration

init(lowerAngleLimit: CGFloat, upperAngleLimit: CGFloat)

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