We've seen a lot of "hovering" monsters in games in the past, but creatures flying in full 3D space are still a quite fresh and tasty feature. Creating a behavior of such a monster with code is challenging, but we can use animations to make it both easy and great looking.
To create a flying creature in this recipe, we need one animation without root motion, Idle
(hovering in place), and nine animations with root motion: FlyingForward
(flying straight forward), FlyingForwardUp
(flying forward and increasing altitude at the same time), FlyingForwardDown
(flying forward and decreasing altitude at the same time), FlyingLeft
(flying left in circles-the same way as the WalkLeft
animation in previous recipes), FlyingRight
(flying right in circles), FlyingLeftUp
(flying left in circles with increasing altitude), FlyingLeftDown
(flying left in circles with decreasing altitude), FlyingRightUp
(flying right in circles with increasing altitude...