Or whatever it's called.
I know OTA units have their scripts smoothed out by detecting series of move..now and turn..now commands followed by a sleep command, and making smooth animations based on those. The question is: how do I make it work on my own units? I simply need to sync together a lot of motion for my 6-legged Drone units, and it would be a lot easier through the use of sleep-delimited animation frames.
Animation interpolation
Moderator: Moderators
- RightField
- Posts: 110
- Joined: 11 Nov 2004, 21:29
-
- Posts: 578
- Joined: 19 Aug 2004, 17:38
It basically works like this: When a move-now or a turn-now command is detected, it is saved to a list of delayed animations, instead of updating the piece coordinates directly. When the script is finished, if the script finished because of a call to sleep with a 30 < sleeptime < 300, these delayed animations are translated into interpolated ones for the duration of the sleep. Otherwise the values are updated directly.
The following checks are made to make sure these interpolatations are transparent: If a move/turn on the same piece and axis is done later during the same tick, the delayed animation is commited first. Also, an interpolation is not allowed to overwrite a turn or move in progress (unless it originated from a previous interpolation), if one is running the values are updated directly instead.
The following checks are made to make sure these interpolatations are transparent: If a move/turn on the same piece and axis is done later during the same tick, the delayed animation is commited first. Also, an interpolation is not allowed to overwrite a turn or move in progress (unless it originated from a previous interpolation), if one is running the values are updated directly instead.
-
- Posts: 578
- Joined: 19 Aug 2004, 17:38