# PhysicsBody.TransformWriteMode

> The method used to Write the body pose to the Transform. See _transformWriteMode.

## Definition

* **Type:** Enum
* **Namespace:** [Unity.U2D.Physics](/engine/6000.7/script-reference/unity/u2d/physics.md)
* **Assembly:** UnityEngine.PhysicsCore2DModule

```csharp
public enum PhysicsBody.TransformWriteMode
```

## Remarks

By default, Unity writes the Transform component after it finishes calculating the physics simulation. Set this mode to `Interpolate` or `Extrapolate` instead to interpolate positions between simulation steps. [\_transformObject](/engine/6000.7/script-reference/unity/u2d/physics/physicsbody/transformobject.md) is available only in a C# script, not in the Inspector window of a public [PhysicsBodyDefinition](/engine/6000.7/script-reference/unity/u2d/physics/physicsbodydefinition.md) object.

## Examples

```csharp
// Move a GameObject by creating a dynamic body and writing its Transform.
using UnityEngine;
using Unity.U2D.Physics;

public class MoveGameObject : MonoBehaviour
{
    public PhysicsWorld world;
    public PhysicsWorldDefinition worldDefinition = PhysicsWorldDefinition.defaultDefinition;

    void Awake()
    {
        // Enable physics bodies updating transforms.
        worldDefinition.transformWriteMode = PhysicsWorld.TransformWriteMode.Fast2D;
        world = PhysicsWorld.Create(worldDefinition);
    }

    void Start()
    {
        // Create a body and shape.
        PhysicsBody circleBody = world.CreateBody();
        CircleGeometry circleGeometry = new CircleGeometry { radius = 2f };
        circleBody.CreateShape(circleGeometry);

        // Set body to dynamic so it falls under gravity.
        circleBody.type = PhysicsBody.BodyType.Dynamic;

        // Enable this physics body updating transforms.
        circleBody.transformWriteMode = PhysicsBody.TransformWriteMode.Current;

        // Set the updated transform as the transform of this GameObject.
        circleBody.transformObject = transform;
    }
}
```

## Fields

| Value                                                                                                          | Description                                                                                                                                                                                        |
| -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [Current](/engine/6000.7/script-reference/unity/u2d/physics/physicsbody/transformwritemode/current.md)         | The current body pose will be written to the Transform.                                                                                                                                            |
| [Extrapolate](/engine/6000.7/script-reference/unity/u2d/physics/physicsbody/transformwritemode/extrapolate.md) | The pose extrapolated from the current body pose to a future pose based upon the current linear/angular velocities will be written to the Transform. The transform pose is essentially predictive. |
| [Interpolate](/engine/6000.7/script-reference/unity/u2d/physics/physicsbody/transformwritemode/interpolate.md) | The interpolated pose from the previous body pose to the current body pose will be written to the Transform. The transform pose is essentially historic.                                           |
| [Off](/engine/6000.7/script-reference/unity/u2d/physics/physicsbody/transformwritemode/off.md)                 | This body pose won't be written to the Transform.                                                                                                                                                  |
