> 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/api/flatredball/math/geometry/polygon/z.md).

# Z

### Introduction

All FlatRedBall shapes inherit from the [PositionedObject](https://github.com/flatredball/FlatRedBallDocs/tree/main/frb/docs/index.php) class, so they inherit the X, Y, Z, and Position properties. The Z value of shapes impacts their rendering, but not collision. In other words, shapes will render differently according to their Z value when rendering on a 3D camera, but they will collide as if their Z values are all the same.

### Position relative to the Polygon

The Position of the Polygon is a bit of an abstract concept because it may or may not represent the center of a Polygon. In fact, it may not even lie inside of a Polygon depending on how the Points values are set. If you use the [CreateEquilateral](https://github.com/flatredball/FlatRedBallDocs/tree/main/frb/docs/index.php) or [CreateRectangle](https://github.com/flatredball/FlatRedBallDocs/tree/main/frb/docs/index.php) functions, then the Position will represent the center of the Polygon. If you have constructed the Polygon yourself by setting the Polygon's [Points](https://github.com/flatredball/FlatRedBallDocs/tree/main/frb/docs/index.php), then the Position value relative to points depends on the values you've assigned to [Points](https://github.com/flatredball/FlatRedBallDocs/tree/main/frb/docs/index.php).

### Shape vs. non-Shape sorting

Shapes and non-Shapes which are on the same Layer (or which are all un-Layered) will not sort with each other. For more information see [the ShapeManager.ShapeDrawingOrder page](https://github.com/flatredball/FlatRedBallDocs/tree/main/frb/docs/index.php).


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.flatredball.com/flatredball/api/flatredball/math/geometry/polygon/z.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
