# MovePosition(Vector3)

> Moves the kinematic Rigidbody towards position.

## Definition

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

```csharp
public void MovePosition(Vector3 position)
```

### Parameters

**** (\[Vector3]\(/engine/6000.6/script-reference/unityengine/vector3)): Provides the new position for the [Rigidbody](/engine/6000.6/script-reference/unityengine/rigidbody.md) object.

### Remarks

[Rigidbody.MovePosition](/engine/6000.6/script-reference/unityengine/rigidbody/moveposition.md) moves a Rigidbody and complies with the interpolation settings. When Rigidbody interpolation is enabled, [Rigidbody.MovePosition](/engine/6000.6/script-reference/unityengine/rigidbody/moveposition.md) creates a smooth transition between frames. Unity moves a [Rigidbody](/engine/6000.6/script-reference/unityengine/rigidbody.md) in each `FixedUpdate` call. The `position` occurs in world space. To teleport a [Rigidbody](/engine/6000.6/script-reference/unityengine/rigidbody.md) from one position to another, use [Rigidbody.position](/engine/6000.6/script-reference/unityengine/rigidbody/position.md) instead of [Rigidbody.MovePosition](/engine/6000.6/script-reference/unityengine/rigidbody/moveposition.md).

### Examples

```csharp
using UnityEngine;
using UnityEngine.InputSystem;

public class Example : MonoBehaviour
{
    private Rigidbody rb;
    private float moveSpeed = 5f;

    [Header("Input Actions")]
    public InputActionReference moveAction;

    private void OnEnable()
    {
        moveAction.action.Enable();
    }

    private void OnDisable()
    {
        moveAction.action.Disable();
    }

    void Awake()
    {
        //Fetch the Rigidbody from the GameObject with this script attached
        rb = GetComponent<Rigidbody>();
    }

    void FixedUpdate()
    {
        //Store user input as a movement vector
        Vector3 m_Input = new Vector3(moveAction.action.ReadValue<Vector2>().x, 0, moveAction.action.ReadValue<Vector2>().y);

        //Apply the movement vector to the current position, which is
        //multiplied by deltaTime and speed for a smooth MovePosition
        rb.MovePosition(transform.position + m_Input * Time.fixedDeltaTime * moveSpeed);
    }
}
```
