# drawDepth

> The depth that custom drawing is drawn at when it is not tied to a body, in world space, along the axis perpendicular to the transform plane.

## Definition

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

```csharp
public float drawDepth { get; set; }
```

### Remarks

Custom drawing of geometry, points and lines has no body to take a depth from, so it is drawn at this depth. Set the depth before performing the custom drawing it applies to. The depth axis is Z for [PhysicsWorld.TransformPlane.XY](/engine/6000.7/script-reference/unity/u2d/physics/physicsworld/transformplane/xy.md), Y for [PhysicsWorld.TransformPlane.XZ](/engine/6000.7/script-reference/unity/u2d/physics/physicsworld/transformplane/xz.md) and X for [PhysicsWorld.TransformPlane.ZY](/engine/6000.7/script-reference/unity/u2d/physics/physicsworld/transformplane/zy.md). Drawing that belongs to a body, such as a body, shape or joint being drawn by the world, uses the depth of that body instead. See [PhysicsBody.drawDepth](/engine/6000.7/script-reference/unity/u2d/physics/physicsbody/drawdepth.md). A value that is not finite is rejected and leaves the depth unchanged. The depth stays as set until it is changed or [PhysicsWorld.ClearDraw](/engine/6000.7/script-reference/unity/u2d/physics/physicsworld/cleardraw.md) is called, which resets it to zero.
