> 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/includeinicollidable.md).

# IncludeInICollidable

### Introduction

The IncludeInICollidable property controls whether an object is included in the container Entity's Collision ShapeCollection. By default this value is set to true, which means that any shape included in an ICollidable entity will be considered in collision. This can be set to false to exclude a Shape from the Collision ShapeCollection. Typically this value is set to false for shapes which should not be used for standard (solid) collision, such as line of sight collision.

![](https://951240982-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M_fye9Ufg3vzJxwX5Hk%2Fuploads%2Fgit-blob-e99924bbf3b8bf761586d196b000c76d7b948814%2F2022-11-img_638523b56c5c7.png?alt=media)

### Example - Excluding a Circle From Collision

For this example, consider an Entity named Enemy which has two shapes:

* An AxisAlignedRectangle named Body
* A Circle named DetectionCollision

![](https://951240982-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M_fye9Ufg3vzJxwX5Hk%2Fuploads%2Fgit-blob-a4c4a1979a49b9fa959fd4fff6ea24e0aebd58d6%2F2021-08-img_612a53bf12bf0.png?alt=media)

In game, the entity may appear as shown in the following image:

![](https://951240982-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M_fye9Ufg3vzJxwX5Hk%2Fuploads%2Fgit-blob-27531e63e586662369127c8efba3d2a2edea67b6%2F2021-08-img_612a569c30411.png?alt=media)

In this example, the Body is used for collision against walls, the Player, and bullets. The DetectionCollision Circle is used to determine if an Enemy sees the Player. Therefore, we only want the DetectionCollision to be used in a special circumstance - a CollisionRelationship between Enemy and Player lists. Otherwise, the DetectionCollision should be excluded. The DetectionCollision can be excluded from default collision functions by setting the IncludeInICollidable to false.

![](https://951240982-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M_fye9Ufg3vzJxwX5Hk%2Fuploads%2Fgit-blob-5298b2c1b6812e1d18055b608931948a09b21bac%2F2021-08-img_612a5791b20ff.png?alt=media)

By default collision relationships will not use the DetectionCollision. For example, the following collision relationship would not collide the enemy against the walls:

![](https://951240982-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M_fye9Ufg3vzJxwX5Hk%2Fuploads%2Fgit-blob-8da7a81c7ba80a5b82151c193134bfbfb41388b8%2F2021-08-img_612a57dcefc4f.png?alt=media)

However, the following collision relationship would still detect collisions between the Enemy's DetectionCircle and the Player:

![](https://951240982-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M_fye9Ufg3vzJxwX5Hk%2Fuploads%2Fgit-blob-1d314bce7254c86193591a821265a5357f09a0c7%2F2021-08-img_612a5813a78ba.png?alt=media)

Notice that even though the DetectionCollision has its IncludeInICollidable set to false, collision relationships which explicitly reference this shape will still check collision.


---

# 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/glue-reference/objects/includeinicollidable.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.
