---
title: "addForce(_:at:relativeTo:)"
framework: realitykit
role: symbol
role_heading: Instance Method
path: "realitykit/hasphysicsbody/addforce(_:at:relativeto:)"
---

# addForce(_:at:relativeTo:)

Applies a force to the physics body at the specified position.

## Declaration

```swift
@MainActor @preconcurrency func addForce(_ force: SIMD3<Float>, at position: SIMD3<Float>, relativeTo referenceEntity: Entity?)
```

## Parameters

- `force`: A force in newtons.
- `position`: The position at which to apply the force.
- `referenceEntity`: The reference entity that defines the coordinate space in which position and force are defined.

## Discussion

Discussion The physics simulator applies the added force until the end of the frame interval. To continue exerting the force after that time, add the force again with another call to the method. Handle the SceneEvents.Update event to receive an indication of when the frame interval ends. For an app that renders at 60 frames per second (fps), this event occurs about once per 16 milliseconds.

## See Also

### Adding and clearing forces

- [addForce(_:relativeTo:)](realitykit/hasphysicsbody/addforce(_:relativeto:).md)
- [addTorque(_:relativeTo:)](realitykit/hasphysicsbody/addtorque(_:relativeto:).md)
- [clearForcesAndTorques()](realitykit/hasphysicsbody/clearforcesandtorques().md)
