> For the complete documentation index, see [llms.txt](https://malbersanimations.gitbook.io/animal-controller/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://malbersanimations.gitbook.io/animal-controller/global-components/interactable.md).

# Interactable

## &#x20;Overview

This component is often used to create interaction with the animals, even though it has no dependencies with the Animal Controller,  it can be used as a stand-alone component, along with the Interactor script.

{% hint style="info" %}
The script for the Interactable is **MInteract**.
{% endhint %}

<figure><img src="/files/LEaAsr8tC3nCrQwAjFC5" alt=""><figcaption></figcaption></figure>

## Parameters

### Index

Index of the Interactable. This value is used by the [Interactor](/animal-controller/global-components/interactor.md) as an Event to identify with which interactable the [Interactor](/animal-controller/global-components/interactor.md) is interacting.

### Interactor ID

Which [Interactors ](/animal-controller/global-components/interactor.md)can interact with this Interactable, by default is set to -1 which means this interactable can interact will all interactors.

### Auto Interact

If the [Interactor](/animal-controller/global-components/interactor.md) has this interactable focus, it will apply the Interaction logic automatically, without having to call the Interact() method.

### Single Interaction

Interact once. After an interaction is executed with this interactable, this component will be disabled, so it no longer can be used.

### Delay

Delay time to execute/call the interaction logic.

### Cooldown

The time needed to elapse between interactions. This only works when Single Interaction is set to false

## Events

<figure><img src="/files/8YNUKwmoPQNosq6IuJ8w" alt=""><figcaption></figcaption></figure>

### On Interact with GO (GameObject)

Invoked when the Interactor executes an interaction. The parameter is the [Interactor](/animal-controller/global-components/interactor.md) Gameobject

### On Interact with (Int)

Invoked when the Interactor executes an interaction. The parameter is the [Interactor](/animal-controller/global-components/interactor.md) Index. this is called right after the Event OnInteractWithGo(GameObject).

### On Focused

Invoked when the [Interactor](/animal-controller/global-components/interactor.md) has this Interactable as the focused Interactable.&#x20;

### On Unfocused

Invoked when the [Interactor](/animal-controller/global-components/interactor.md) has **lost** this Interactable as the focused Interactable.&#x20;


---

# 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, and the optional `goal` query parameter:

```
GET https://malbersanimations.gitbook.io/animal-controller/global-components/interactable.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
