> For the complete documentation index, see [llms.txt](https://vyuka.digitalneumenia.sk/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://vyuka.digitalneumenia.sk/afad-unity-toolkit/2.-interactive-objects.md).

# 2. Interactive objects

Active game objects in the scene are called interactables. When the player's crosshair sees an interactable object, the crosshair changes and an action message appears.

Interactables can create events and you can bind actions to these events. For example when an object is picked up, you can play a sound effect.

## Pickable

No special interaction available. When picked up, the object attaches itself to player and the player can carry the object, drop the object and even throw the object. Object collisions are not detected, to keep the operation simple.

{% embed url="<https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F13RBwdyZr4uL7VgTcWNI%2Fuploads%2F380G0imHh226WoZAsh8T%2F02-pickable.mp4?alt=media&token=8b2064fc-d4b5-40b3-bb1f-a816c00b61d1>" %}

## Interactable

Object with interactable component has a single operation, e.g. run animation, open NPC dialogue, etc.&#x20;

{% embed url="<https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F13RBwdyZr4uL7VgTcWNI%2Fuploads%2FpaRDTY6FJkHIKHzLR5cB%2F03-interactable-cut.mp4?alt=media&token=1c3b2899-5075-453a-9fc8-0f888e1f7061>" %}

## **Switch**

Switch works similarly to Interactable, but two operations are available - turn on and turn off - like a light switch.

{% embed url="<https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F13RBwdyZr4uL7VgTcWNI%2Fuploads%2FtKjx8H4etqyb97jsFyAa%2F04-switch.mp4?alt=media&token=8fb2ac71-8830-4424-b526-57b74d6f59d7>" %}
