Making a Spaceship Fly using Timeline
The past few articles have been dealing with simple animations in Unity using the Timeline editor. This article is all about flight, so let’s use what we have learned so far, and help this space ship get off the ground!
I will be using this Alien Ship from the Filebase asset library, by GameDevHQ.
Here is a previously existing scene that I put together during a level design course with GameDevHQ. The outside courtyard is just right for a small craft take off point.
This area of the Hierarchy showcases the objects that I will be using to make these animations, excluding the environment. I create an empty parent object called Timeline_Ship, followed by another empty object called Director_Ship. The Alien Ship object is placed inside that, along with two area lights and particle systems (bottom of ship facing the ground from the thrusters). There is a stationary Cinemachine Virtual Camera with a LookAt assignment for the Alien Ship. The last ingredient is a Fog particle system for some additional ambiance and disturbed ground dust.
The Alien Ship has the Director component added to it, as well as three animations.
The initial animation has the ship lifting off the ground into the air. There is a little shakiness added in the rotations of the animation to try and get the feel of a less than perfect takeoff.
The second animation has the ship rotate 180 degrees while beginning to angle upwards by about 30 degrees.
The final animation has the ship darting forward into space, with the Trail Renderer of the particle system taking care of the rest.
That’s it for getting this pilot off the planet. Thanks for reading!