<!--
{
  "availability" : [
    "iOS: 18.0.0 -",
    "iPadOS: 18.0.0 -",
    "macCatalyst: 18.0.0 -",
    "macOS: 15.0.0 -",
    "tvOS: 26.0.0 -",
    "visionOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "RealityKit",
  "identifier" : "/documentation/RealityKit/PhysicsSphericalJoint/init(pin0:pin1:angularLimitInYZ:checksForInternalCollisions:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "RealityKit"
    ],
    "preciseIdentifier" : "s:17RealityFoundation21PhysicsSphericalJointV4pin04pin116angularLimitInYZ27checksForInternalCollisionsAcA12GeometricPinV_AISf_SftSgSbtcfc"
  },
  "title" : "init(pin0:pin1:angularLimitInYZ:checksForInternalCollisions:)"
}
-->

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

Creates a new spherical joint.

```
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 [`Entity`](/documentation/RealityKit/Entity) instances.

## 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.

---

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)