---
title: PhysicsCustomJoint
framework: realitykit
role: symbol
role_heading: Structure
path: realitykit/physicscustomjoint
---

# PhysicsCustomJoint

A joint with six degrees of freedom that can be individually specified.

## Declaration

```swift
struct PhysicsCustomJoint
```

## Overview

Overview A custom joint allows you to choose the restraints of all 6 degrees of freedom. You can set a PhysicsCustomJoint.MotionLimit for each degrees’ motion. note: By default all degrees of freedom are locked, similar to PhysicsFixedJoint. For example, you can constrain the motion of pin1 in the xy-plane of pin0, set movement along the x-axis to PhysicsCustomJoint.MotionLimit.unlimited, and leave all rotations as the default value of PhysicsCustomJoint.MotionLimit.fixed. note: The xy-plane is a plane that aligns with the x and y axes. let joint = PhysicsCustomJoint(     pin0: entity0pin,     pin1: entity1pin,     linearMotionAlongX: .unlimited,     linearMotionAlongY: .range(-5...5) ) If pin0 is in a fixed location for the example above, this joint allows pin1 to move anywhere along the x-axis of pin0, and can move up to 5 local meters above or below the y-axis of pin0.

## Topics

### Initializers

- [init(pin0:pin1:linearMotionAlongX:linearMotionAlongY:linearMotionAlongZ:angularMotionAroundX:angularMotionAroundY:angularMotionAroundZ:checksForInternalCollisions:)](realitykit/physicscustomjoint/init(pin0:pin1:linearmotionalongx:linearmotionalongy:linearmotionalongz:angularmotionaroundx:angularmotionaroundy:angularmotionaroundz:checksforinternalcollisions:).md)

### Instance Properties

- [angularMotionAroundX](realitykit/physicscustomjoint/angularmotionaroundx.md)
- [angularMotionAroundY](realitykit/physicscustomjoint/angularmotionaroundy.md)
- [angularMotionAroundZ](realitykit/physicscustomjoint/angularmotionaroundz.md)
- [linearMotionAlongX](realitykit/physicscustomjoint/linearmotionalongx.md)
- [linearMotionAlongY](realitykit/physicscustomjoint/linearmotionalongy.md)
- [linearMotionAlongZ](realitykit/physicscustomjoint/linearmotionalongz.md)

### Enumerations

- [PhysicsCustomJoint.MotionLimit](realitykit/physicscustomjoint/motionlimit.md)

## Relationships

### Conforms To

- [Equatable](swift/equatable.md)
- [PhysicsJoint](realitykit/physicsjoint.md)

## See Also

### Built-in joint types

- [PhysicsRevoluteJoint](realitykit/physicsrevolutejoint.md)
- [PhysicsPrismaticJoint](realitykit/physicsprismaticjoint.md)
- [PhysicsSphericalJoint](realitykit/physicssphericaljoint.md)
- [PhysicsDistanceJoint](realitykit/physicsdistancejoint.md)
- [PhysicsFixedJoint](realitykit/physicsfixedjoint.md)
- [PhysicsJoints](realitykit/physicsjoints.md)
