---
title: mode
framework: realitykit
role: symbol
role_heading: Instance Property
path: realitykit/physicsbodycomponent/mode
---

# mode

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

## Declaration

```swift
var mode: PhysicsBodyMode
```

## Discussion

Discussion The property’s default value is PhysicsBodyMode.dynamic, which means the physics body responds to forces and can collide with all other physics bodies in the simulation. important: Improve the performance of your app by applying dynamic mode to the physics bodies for just entities that need to interact with all other physics bodies, because each dynamic physics body can be computationally expensive. To configure the physics body so that an entity can move around the simulation without reacting to forces, set the property to PhysicsBodyMode.kinematic. Apps typically use kinematic mode for entities the app programmatically controls, such as in response to a control or a person’s interaction. For entities that don’t need to move at all, set its physics body’s mode to PhysicsBodyMode.static. Physics bodies in static or kinematic mode can’t collide with other physics bodies with either mode, by default. Optionally, you can add collision support for entities that have a physics body in either static or kinematic mode by adding a PhysicsSimulationComponent to an entity that’s a common ancestor to the entities you want to collide. Then you can set PhysicsSimulationComponent.CollisionOptions to your preference. You can change the mode of an entity’s physics body at any time, but changing it from static to another mode can affect your app’s performance because the transition to a non-static mode can trigger the simulation to rebuild its state. tip: Set the mode of an entity’s physics body to static if you know the entity doesn’t ever need to move; otherwise, set the mode to kinematic or dynamic, even if the entity isn’t currently moving.
