---
title: "addTorque(_:relativeTo:)"
framework: realitykit
role: symbol
role_heading: Instance Method
path: "realitykit/hasphysicsbody/addtorque(_:relativeto:)"
---

# addTorque(_:relativeTo:)

Applies a torque to the physics body at its center of mass.

## Declaration

```swift
@MainActor @preconcurrency func addTorque(_ torque: SIMD3<Float>, relativeTo referenceEntity: Entity?)
```

## Parameters

- `torque`: A torque in newton meters per radian.
- `referenceEntity`: The reference entity that defines the coordinate space in which torque is defined.

## Discussion

Discussion The physics simulator applies the added torque until the end of the frame interval. To continue exerting the torque after that time, add the torque 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)
- [addForce(_:at:relativeTo:)](realitykit/hasphysicsbody/addforce(_:at:relativeto:).md)
- [clearForcesAndTorques()](realitykit/hasphysicsbody/clearforcesandtorques().md)
