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).
- Cooldown: how many seconds before the animation starts over when set to Loop. 0 means instant.
This section only available if you selected the Loop play mode. You can control how to use a loop in this mechanism.
- 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.
- 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).
- Rotate: the script rotates the game object by the given angle over the time of the duration, around the given axis, in local space.