---
title: "init(pin0:pin1:angularLimitInYZ:checksForInternalCollisions:)"
framework: realitykit
role: symbol
role_heading: Initializer
path: "realitykit/physicssphericaljoint/init(pin0:pin1:angularlimitinyz:checksforinternalcollisions:)"
---

# init(pin0:pin1:angularLimitInYZ:checksForInternalCollisions:)

Creates a new spherical joint.

## Declaration

```swift
init(pin0: GeometricPin, pin1: GeometricPin, angularLimitInYZ: (Float, Float)? = nil, checksForInternalCollisions: Bool = false)
```

## Parameters

- `pin0`: The local position and orientation on the first entity.
- `pin1`: The local position and orientation on the second entity.
- `angularLimitInYZ`: A maximum value of rotation in radians from the y and z axes if defined.
- `checksForInternalCollisions`: A Boolean that indicates whether the joint checks for collisions between the two doc://com.apple.RealityKit/documentation/RealityKit/Entity instances.

## Discussion

Discussion An elliptical cone is formed around the x-axis to limit the motion of pin1 if angularLimitInYZ is defined. If angularLimitInYZ is undefined, pin1 has full 360º rotational freedom in all axes.
