<!--
{
  "availability" : [
    "iOS: 8.0.0 - 26.0.0",
    "iPadOS: 8.0.0 - 26.0.0",
    "macCatalyst: 13.1.0 - 26.0.0",
    "macOS: 10.8.0 - 26.0.0",
    "tvOS: 9.0.0 - 26.0.0",
    "visionOS: 1.0.0 - 26.0.0",
    "watchOS: 3.0.0 - 26.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "SceneKit",
  "identifier" : "/documentation/SceneKit/SCNIKConstraint/setMaxAllowedRotationAngle(_:forJoint:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "SceneKit"
    ],
    "preciseIdentifier" : "c:objc(cs)SCNIKConstraint(im)setMaxAllowedRotationAngle:forJoint:"
  },
  "title" : "setMaxAllowedRotationAngle(_:forJoint:)"
}
-->

# setMaxAllowedRotationAngle(_:forJoint:)

Sets the rotation limit, in degrees, for the specified node.

```
func setMaxAllowedRotationAngle(_ angle: CGFloat, forJoint node: SCNNode)
```

## Parameters

`angle`

The maximum rotation, in degrees, that SceneKit should apply to the specified node when evaluating the constraint.

`node`

A node affected by the constraint—either the node whose [`constraints`](/documentation/SceneKit/SCNNode/constraints) property references the constraint, or one of that node’s parent or ancestor nodes up to the node specified by the constraint’s [`chainRootNode`](/documentation/SceneKit/SCNIKConstraint/chainRootNode) property.

## Discussion

When SceneKit evaluates the IK constraint, it checks the target orientations of each node in the chain relative to their initial orientations (as of when the constraint was applied to a node). For each node in the chain, SceneKit limits the rotation (in any direction) between the initial and target orientations to the `angle` value specified with this method.

The default rotation limit for each joint is 180 degrees in either direction, allowing unconstrained rotation.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)