---
title: SCNPhysicsBallSocketJoint
framework: scenekit
role: symbol
role_heading: Class
path: scenekit/scnphysicsballsocketjoint
---

# SCNPhysicsBallSocketJoint

A physics behavior that connects two physics bodies and allows them to pivot around each other in any direction.

## Declaration

```swift
class SCNPhysicsBallSocketJoint
```

## Overview

Overview A ball and socket joint has three rotational degrees of freedom and zero translational degrees of freedom. You can also use a ball and socket joint to pin a body to a specific location in the coordinate space of the node containing it while allowing it to rotate freely.

## Topics

### Creating a Ball and Socket Joint

- [init(bodyA:anchorA:bodyB:anchorB:)](scenekit/scnphysicsballsocketjoint/init(bodya:anchora:bodyb:anchorb:).md)
- [init(body:anchor:)](scenekit/scnphysicsballsocketjoint/init(body:anchor:).md)

### Managing the Characteristics of a Ball and Socket Joint

- [bodyA](scenekit/scnphysicsballsocketjoint/bodya.md)
- [anchorA](scenekit/scnphysicsballsocketjoint/anchora.md)
- [bodyB](scenekit/scnphysicsballsocketjoint/bodyb.md)
- [anchorB](scenekit/scnphysicsballsocketjoint/anchorb.md)

## Relationships

### Inherits From

- [SCNPhysicsBehavior](scenekit/scnphysicsbehavior.md)

### Conforms To

- [CVarArg](swift/cvararg.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [NSCoding](foundation/nscoding.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)
- [NSSecureCoding](foundation/nssecurecoding.md)

## See Also

### Joints

- [SCNPhysicsHingeJoint](scenekit/scnphysicshingejoint.md)
- [SCNPhysicsSliderJoint](scenekit/scnphysicssliderjoint.md)
- [SCNPhysicsConeTwistJoint](scenekit/scnphysicsconetwistjoint.md)
