> For the complete documentation index, see [llms.txt](https://traps.runemarkstudio.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://traps.runemarkstudio.com/traps/trap-mechanism/trap-animator.md).

# Animator

![](https://4289778471-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MVKw8MgRKSYbFzCqlnm%2F-MW4rkN5WrLNRM-9-4pg%2F-MW4sDG68NAPX1JF97R5%2Fanimator-illustration.PNG?alt=media\&token=82c3493d-05fc-4c75-8713-3e48a87257f1)

This script gives us the option to use procedural animation instead of keyframe animations to control the traps. By changing the parameters, you can achieve many different results.

* **Play Mode:** the animation can happen only once, or continuously (Loop).&#x20;
* **Cooldown:** how many seconds before the animation starts over when set to Loop. 0 means instant.

### **Loop Settings**

This section only available if you selected the Loop play mode. You can control how to use a loop in this mechanism.

![](https://4289778471-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MVKw8MgRKSYbFzCqlnm%2F-MW4aTxRe8M1EQLB7-gs%2F-MW4awudvTq0_F8yQl-Y%2Fanimator-loop.PNG?alt=media\&token=87476fae-e96d-4e59-8678-dda5dfd861b9)

* **Loop Mode:** *Repeat* is the standard loop mode. In the case of *Ping-Pong,* the loop goes back and forth.
* **Duration:** how many seconds to finish one loop.
* **Curve:** you can customize the movement dynamic with this curve.
* **Different Reverse (only in Ping Pong mode):** Enabling this option allows you to set different duration and curves when the loop goes backward.

### **Animator Settings**

* **Translate:** the script moves the game object between the start position and the end position. This movement is relative to the anchor transform (Local Space).&#x20;

![](https://4289778471-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MVKw8MgRKSYbFzCqlnm%2F-MW4bB32nMlUbPym5-Nw%2F-MW4bUot4yM6M2xQUvYg%2Fanimator-translate.PNG?alt=media\&token=7b2af09c-830a-4c22-bf6f-fa140affd515)

* **Rotate:** the script rotates the game object by the given angle over the time of the duration, around the given axis, in local space.&#x20;

![](https://4289778471-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MVKw8MgRKSYbFzCqlnm%2F-MW4bB32nMlUbPym5-Nw%2F-MW4csOvnjmyHWoXYYWH%2Fanimator-rotate.PNG?alt=media\&token=8fed4cd0-f566-464e-a37a-0d43e8849e7a)
