# AddForceAtPosition(Vector2, Vector2, ForceMode2D)

> Apply a force at a given position in space.

## Definition

* **Type:** Method
* **Namespace:** [UnityEngine](/engine/6000.6/script-reference/unityengine.md)
* **Assembly:** UnityEngine.Physics2DModule

```csharp
public void AddForceAtPosition(Vector2 force, Vector2 position, ForceMode2D mode)
```

### Parameters

**** (\[Vector2]\(/engine/6000.6/script-reference/unityengine/vector2)): Components of the force in the X and Y axes.**** (\[Vector2]\(/engine/6000.6/script-reference/unityengine/vector2)): Position in world space to apply the force.**** (\[ForceMode2D]\(/engine/6000.6/script-reference/unityengine/forcemode2d)): The method used to apply the specified force.

### Remarks

The [Rigidbody2D.AddForce](/engine/6000.6/script-reference/unityengine/rigidbody2d/addforce.md) function applies a force that acts straight through the rigidbody's centre of mass and so produces only positional movement and no rotation. *AddForceAtPosition* can apply the force at any position in world space and will typically also apply a *torque* to the object which will set it rotating. Note that for the purposes of this function, the rigidbody is just a coordinate space of infinite size, so there is no reason why the force needs to be applied within the confines of the object's graphic or colliders.

Additional Resources:: [Rigidbody2D.AddForce](/engine/6000.6/script-reference/unityengine/rigidbody2d/addforce.md), [Rigidbody2D.AddTorque](/engine/6000.6/script-reference/unityengine/rigidbody2d/addtorque.md), [Rigidbody2D.AddForceAtPosition](/engine/6000.6/script-reference/unityengine/rigidbody2d/addforceatposition.md), [ForceMode2D](/engine/6000.6/script-reference/unityengine/forcemode2d.md).
