<!--
{
  "availability" : [
    "iOS: 13.0.0 -",
    "iPadOS: 13.0.0 -",
    "macCatalyst: 13.0.0 -",
    "macOS: 10.15.0 -",
    "tvOS: 26.0.0 -",
    "visionOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "RealityKit",
  "identifier" : "/documentation/RealityKit/PhysicsBodyComponent",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "RealityKit"
    ],
    "preciseIdentifier" : "s:17RealityFoundation20PhysicsBodyComponentV"
  },
  "title" : "PhysicsBodyComponent"
}
-->

# PhysicsBodyComponent

A component that defines an entity’s behavior in physics body simulations.

```
struct PhysicsBodyComponent
```

## Overview

Only entities with a [`PhysicsBodyComponent`](/documentation/RealityKit/PhysicsBodyComponent)
and a [`CollisionComponent`](/documentation/RealityKit/CollisionComponent)
can participate in a scene’s physics simulation.
If you need to move an entity that participates
in the physics system, it also needs a [`PhysicsMotionComponent`](/documentation/RealityKit/PhysicsMotionComponent).

Add a physics body component to an entity by adopting the [`HasPhysicsBody`](/documentation/RealityKit/HasPhysicsBody) protocol, which
allows RealityKit’s physics simulation to compute behavior in response to forces acting upon the body,
following basic rules of Newtonian mechanics.

Note the following when considering applying a non-uniform scale to an entity:

- Non-uniform scaling is applicable only to box, convex mesh and triangle mesh collision shapes.
- Non-uniform scaling is not supported for all other types of collision shapes. In this case the scale.x
  value is duplicated to the scale’s y and z components as well to force scale uniformity based on the x component.
- If the entity has a non-uniform scale assigned to its transform then that entity should not
  have any descendants assigned that contain rotations in their transforms. A good rule of thumb is to
  assign the non-uniform scale to the entity that has the collision shape, and avoid adding children below
  that entity.

> Note: Model entities have a physics body component by default.

## Topics

### Creating a physics body component

[`init()`](/documentation/RealityKit/PhysicsBodyComponent/init())

Creates a physics body component with default settings.

[`init(massProperties:material:mode:)`](/documentation/RealityKit/PhysicsBodyComponent/init(massProperties:material:mode:))

Creates a physics body component with the given mass properties,
material, and mode.

[`init(shapes:density:material:mode:)`](/documentation/RealityKit/PhysicsBodyComponent/init(shapes:density:material:mode:))

Creates a physics body component deriving mass properties from shape and
density.

[`init(shapes:mass:material:mode:)`](/documentation/RealityKit/PhysicsBodyComponent/init(shapes:mass:material:mode:))

Creates a physics body component deriving mass properties from shape and
mass.

### Detecting collisions

[`isContinuousCollisionDetectionEnabled`](/documentation/RealityKit/PhysicsBodyComponent/isContinuousCollisionDetectionEnabled)

A Boolean that controls whether the physics simulation performs
continuous collision detection.

### Locking movement

[`isRotationLocked`](/documentation/RealityKit/PhysicsBodyComponent/isRotationLocked)

A tuple of Boolean values that you use to lock rotation of the physics
body around any of the three axes.

[`isTranslationLocked`](/documentation/RealityKit/PhysicsBodyComponent/isTranslationLocked)

A tuple of Boolean values that you use to lock the position of the
physics body along any of the three axes.

### Setting the mode

[`mode`](/documentation/RealityKit/PhysicsBodyComponent/mode)

The behavioral mode that controls the way the physics body moves
and interacts with other physics bodies in a simulation.

### Setting material properties

[`material`](/documentation/RealityKit/PhysicsBodyComponent/material)

The physics body’s material properties, like friction.

### Setting mass properties

[`massProperties`](/documentation/RealityKit/PhysicsBodyComponent/massProperties)

The physics body’s mass properties, like inertia and center of mass.



---

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)