<!--
{
  "documentType" : "article",
  "framework" : "RealityKit",
  "identifier" : "/documentation/RealityKit/physics-joints-and-pins",
  "metadataVersion" : "0.1.0",
  "role" : "collectionGroup",
  "title" : "Physics joints and pins"
}
-->

# Physics joints and pins

Simulate joint physics that connect virtual objects.

## Overview

In a 3D environment, you can animate various attributes of an [`Entity`](/documentation/RealityKit/Entity) such as its location,
rotation, and size from one value to another.
This is ideal for simple pre-defined motion, but does not allow for interaction with external forces,
such as collisions with other objects, or gestures.
With a [`PhysicsJoint`](/documentation/RealityKit/PhysicsJoint) you can connect entities with pins,
and RealityKit keeps your entities bound by constraints that you define.

Each joint consists of two pins, each of which belongs to a different entity.
Each [`GeometricPin`](/documentation/RealityKit/GeometricPin) moves and rotates relative to each other within the bounds of the joint’s constraints.

## Topics

### Pin and joint components

[Simulating physics joints in your RealityKit app](/documentation/RealityKit/simulating-physics-joints-in-your-realitykit-app)

Create realistic, connected motion using physics joints.

[`struct GeometricPin`](/documentation/RealityKit/GeometricPin)

A structure that identifies a local transform relative to an entity or entity’s animating skeletal joint.

[`struct GeometricPinsComponent`](/documentation/RealityKit/GeometricPinsComponent)

A component that stores a sequence of geometric pins.

[`protocol PhysicsJoint`](/documentation/RealityKit/PhysicsJoint)

A type that describes physics joints.

[`struct PhysicsJointsComponent`](/documentation/RealityKit/PhysicsJointsComponent)

A component that stores physics joints which RealityKit simulates.

[`struct EntityGeometricPins`](/documentation/RealityKit/EntityGeometricPins)

A structure that wraps all geometric pins an entity owns.

[`struct AttachedTransformComponent`](/documentation/RealityKit/AttachedTransformComponent)

A component that stores an optional source pin owned by this entity and
a target pin which this entity is attached to

### Built-in joint types

[`struct PhysicsRevoluteJoint`](/documentation/RealityKit/PhysicsRevoluteJoint)

A joint that allows one degree of rotational freedom between two entity pins,
similar to a door swinging on its hinges.

[`struct PhysicsPrismaticJoint`](/documentation/RealityKit/PhysicsPrismaticJoint)

A joint that allows movement along a straight line, similar to a sliding drawer.

[`struct PhysicsSphericalJoint`](/documentation/RealityKit/PhysicsSphericalJoint)

A spherical joint that allows free rotational movement between two entities’ pins.

[`struct PhysicsCustomJoint`](/documentation/RealityKit/PhysicsCustomJoint)

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

[`struct PhysicsDistanceJoint`](/documentation/RealityKit/PhysicsDistanceJoint)

A joint that maintains a minimum and maximum distance between two entity pins.

[`struct PhysicsFixedJoint`](/documentation/RealityKit/PhysicsFixedJoint)

A joint that rigidly connects two entity pins, with zero degrees of freedom.

[`struct PhysicsJoints`](/documentation/RealityKit/PhysicsJoints)

A collection of physics joints.



---

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)