# MovePositionAndRotation

> Moves the rigidbody position to position and the rigidbody angle to angle.

## Definition

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

## MovePositionAndRotation(Vector2, float)

Moves the rigidbody position to `position` and the rigidbody angle to `angle`.

```csharp
public void MovePositionAndRotation(Vector2 position, float angle)
```

### Parameters

**** (\[Vector2]\(/engine/6000.7/script-reference/unityengine/vector2)): The position to move the rigidbody to.**** (\[float]\(https\://learn.microsoft.com/dotnet/api/system.single)): The angle to move the rigidbody to.

### Remarks

This is a combination of calling both [MovePosition](/engine/6000.7/script-reference/unityengine/rigidbody2d/moveposition.md) and [MoveRotation](/engine/6000.7/script-reference/unityengine/rigidbody2d/moverotation.md). This can be used to increase performance by not having to perform two separate calls to queue movements.

For more details on the operation of movement using these methods, refer to [Rigidbody2D.MovePosition](/engine/6000.7/script-reference/unityengine/rigidbody2d/moveposition.md) and [Rigidbody2D.MoveRotation](/engine/6000.7/script-reference/unityengine/rigidbody2d/moverotation.md).

## MovePositionAndRotation(Vector2, Quaternion)

Moves the rigidbody position to `position` and the rigidbody angle to `rotation`.

```csharp
public void MovePositionAndRotation(Vector2 position, Quaternion rotation)
```

### Parameters

**** (\[Vector2]\(/engine/6000.7/script-reference/unityengine/vector2)): The position to move the rigidbody to.**** (\[Quaternion]\(/engine/6000.7/script-reference/unityengine/quaternion)): The rotation to move the rigidbody to. Only the Z-Axis rotation is used from the full 3D Quaternion rotation.

### Remarks

This is a combination of calling both [MovePosition](/engine/6000.7/script-reference/unityengine/rigidbody2d/moveposition.md) and [MoveRotation](/engine/6000.7/script-reference/unityengine/rigidbody2d/moverotation.md). This can be used to increase performance by not having to perform two separate calls to queue movements.

For more details on the operation of movement using these methods, refer to [Rigidbody2D.MovePosition](/engine/6000.7/script-reference/unityengine/rigidbody2d/moveposition.md) and [Rigidbody2D.MoveRotation](/engine/6000.7/script-reference/unityengine/rigidbody2d/moverotation.md).
