# Z

### Introduction

The Z value of a LayeredTileMap controls the order that it is drawn relative to other objects such as FlatRedBall Entities. Each layer (MapDrawableBatch) on the LayeredTileMap is drawn at one Z value greater than the layer under. For example, consider a map with layers shown in the following image:

![](/files/vEEdV2Gv1M1WqSf3py1A)

Assuming the map's Z value is set to 0, then the layers will have the following Z values:

* GameplayLayer Z = 0
* AboveLayer1 Z = 1
* AboveLayer2 Z = 2

### Shift Map to Move Gameplay Layer to Z0

The Map object (the default LayeredTileMap when using a wizard setup) provides the option to shift the map's Z value so the GameplayLayer's Z is at 0. If this option is checked, then any layer above GameplayLayer has a positive Z value and draws on top of entities at Z = 0. Similarly, if this option is checked then any layer below GameplayLayer has a negative Z value and draws under entities at Z = 0.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.flatredball.com/flatredball/tiled-plugin/flatredball-tilegraphics-layeredtilemap/z.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
