<!--
{
  "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/SCNPhysicsHingeJoint/init(bodyA:axisA:anchorA:bodyB:axisB:anchorB:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "SceneKit"
    ],
    "preciseIdentifier" : "c:objc(cs)SCNPhysicsHingeJoint(cm)jointWithBodyA:axisA:anchorA:bodyB:axisB:anchorB:"
  },
  "title" : "init(bodyA:axisA:anchorA:bodyB:axisB:anchorB:)"
}
-->

# init(bodyA:axisA:anchorA:bodyB:axisB:anchorB:)

Creates a hinge joint connecting two physics bodies.

```
convenience init(bodyA: SCNPhysicsBody, axisA: SCNVector3, anchorA: SCNVector3, bodyB: SCNPhysicsBody, axisB: SCNVector3, anchorB: SCNVector3)
```

## Parameters

`bodyA`

The first physics body to be connected by the joint.

`axisA`

The axis that the hinge pivots around, relative to the node containing the first body.

`anchorA`

The point at which the hinge connects, relative to the node containing the first body.

`bodyB`

The second physics body to be connected by the joint.

`axisB`

The axis that the hinge pivots around, relative to the node containing the second body.

`anchorB`

The point at which the hinge connects, relative to the node containing the second body.

## Return Value

A new hinge joint behavior.

## Discussion

For a behavior to take effect, add it to the physics simulation by calling the [`addBehavior(_:)`](/documentation/SceneKit/SCNPhysicsWorld/addBehavior(_:)) method on your scene’s [`SCNPhysicsWorld`](/documentation/SceneKit/SCNPhysicsWorld) object. The physics bodies constrained by the joint must be attached to nodes in the scene.

---

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)