> For the complete documentation index, see [llms.txt](https://docs.flatredball.com/flatredball/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.flatredball.com/flatredball/glue-reference/objects/object-types/glue-reference-layer/glue-reference-objects-is2d.md).

# Is2D

### Introduction

The Is2D option can be used to make a Layer use 2D coordinates. Layers which are 2D can be used even if the current Camera is in 3D. Layers which are 2D are often used to create HUDs and UI Screens.

![](/files/3r6lhQ3s2lFGf9U6lCKQ)

For information on how to use Layers in code, see [the Layer reference page](https://github.com/flatredball/FlatRedBallDocs/blob/main/documentation/tools/glue-reference/objects/glue-reference-layer.md).

### Common Usage

The most common usage of the Is2D property is to create a 2D layer in a game which uses a 3D camera. Typically 3D games will have some type of 2D hud, so a 2D layer is needed to hold hud.

### 2D Layer on a 3D camera

This example shows a simple setup where a 2D layer can be used on a 3D graphic. First, the game is set up to use a 3D camera.

![](/files/CFvXxVHm6Qo8VApC1Y53)

Next, a Sprite is added to a GameScreen. It has the following variable values:

* Texture = GroundTexture

  ![](/files/CJes1asiD0SioNb8Ab3m)
* Right Texture Pixel = 512
* BottomTexturePixel = 512
* Texture Address Mode = Wrap
* Y = -10
* Rotation X = 1.5708

![](/files/WYs3j7Imv48u6Z3WL3em)

The GameScreen has a layer named **Layer2D** for 2D objects.

![](/files/VExsVNwtNLTcvxulE0P3)

Finally the **GameScreen** has a Text instance called **GameOverText** which has been placed on **Layer2D.**

![](/files/MDhvigBvbvKharT6pvfj)

The result is **SpriteInstance** is drawn in 3D, but the **GameOverText** is drawn and positioned in 2D.

![](/files/KW9lkdPncCEoZbBn2bfZ)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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/glue-reference/objects/object-types/glue-reference-layer/glue-reference-objects-is2d.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.
