Making Spaceships Fly Using Unity’s Timeline
Objective: To create a seamless animation track out of multiple animation clips to make a spaceship fly, using Timeline in Unity.
It is time to have a little fun moving on from the Matching Clip Offsets article to see if we can take 3 separate animation clips (created in Timeline) and join them all together to create a seamless animation sequence.
I have taken a Star Destroyer 3D model asset from Filebase and imported it into a basic 3D scene along with with a custom 6 sided cube space skybox.
I have also gone ahead and created 3 separate animation clips in Timeline that look like this:
Creating the Seamless Transition Using Matching Clip Offsets
I am going to be using ‘Match Offsets to Next Clip’ from within the animation track to make this happen.
Right clicking on clip 1, let’s then select ‘Match Offsets to Next Clip’ and scrub through the time to watch the changes:
Straight away we can see that when clip 1 ends and clip 2 starts, it doesn’t jump back to clip 2’s starting position and rotation. However, we can also see the clip 1 now has an offset on it’s position and rotation at the start to make this seamless transition happen.
I am going to do the same thing now for clips 2 and 3, and let’s take a look between those two:
Removing the Pauses and Watching in Realtime
Highlight all 3 animation clips and right click on one of them, selecting ‘Tile’ and it will remove all the in between pauses to finalise our seamless transition.