[ANDRE] Welcome to the Prototype Series,
a group of videos in which we'll explore creating small projects
combining different Unity features.
In this episode, we'll give you an overview
on how we created the cinematic for a special attack
like some popular fighting games.
We will separate the development process
by talking about the Assets that we gather to start the project,
how we take advantage of Unity's Timeline feature
for the main cinematic, and how we made the Scene
look better in general. So let's get into it.
To get started with this prototype, we took inspiration from Dave Hunt,
one of our developers at Unity that has made a project
using the ninja character inside the Megacity environment.
We thought it would be a great idea to use that as a base
to build the fighter cinematic.
After we downloaded the Assets, we placed the Megacity props
and two ninja characters in the Scene.
In order to frame both characters in the camera at all times,
we used the Cinemachine Virtual Camera
that follows and aims at a Cinemachine Target Group.
The Target Group allows us to input both character positions
and find the middle point between them.
Then, on the Aim property of the Virtual Camera
we selected the Group Composer option
that changes the camera's Field of View automatically
based on the distance between the targets.
Then, it was time to start setting up our special cinematic.
For this, we used Timeline.
Timeline is a feature which can be used to create linear sequences
that are easy to edit.
By creating a Cinemachine Track,
we were able to build smooth transitions
between cameras to define different shots at any angle.
For this special move, we needed to animate the character
as we wanted to make it look like a power was being charged up.
For this, we used the Animation Rigging package
which allows us to use the constraints available
in the package to pose the character
and override its idle animation.
In this particular case, we used two IK constraints
to both arms in order to pose the character as desired.
It's also important to mention that runtime Rigs
have a Weight property that determines how much influence
the constraint has on the character animation.
And we wanted to be able to modify this within our Timeline.
In order to do that, we used an Animation Override Track
that basically creates a new animation clip
in which we can record and edit values.
In this particular animation, we created keyframes
changing the value of the Rig Weight.
In Timeline, we can also use Control Tracks
to enable objects whenever we want.
We use these tracks for activating Particle Systems.
And the advantage of using them with Particle Systems
is that we can preview the emission
while we scrub through the Timeline.
Now, in order to create a Particle System
that really invokes the feeling of a power charging,
we used the Velocity over Lifetime module
and tweaked the value of the Radial velocity.
This brings the particles to the center of the emission.
We also played around with the Orbital property
that, as the name suggests, changes the Orbital velocity of particles
around the X, Y, and Z axes.
And we also enabled the Trails module
to create a more neat effect.
Back on the Override Track,
we also started modifying other properties.
One of those was the Amplitude of the Virtual Camera Noise.
This allowed us to make the camera shake increase
as the power charged.
We also created a specific post-processing Volume
that activated during that moment.
♪ [MUSIC] ♪
And for the second part of this special attack,
we needed the character to make another pose
and also add the logic to hit the other player.
Taking advantage, again, of the Override Track,
we animated the Position of the IK Target for both hands.
♪ [MUSIC] ♪
Then, we used Control Tracks to enable other particle emissions.
One of those emissions that really creates a great effect
for this special move, uses the Stretched Billboard Render Mode
to create the surrounding long lines.
Then in order to trigger the actual code in Timeline,
we created a Signal track to activate a specific function
in our character script at the specific time of the Timeline.
That script uses a SphereCast
to detect targets in front of the player
while the Timeline is playing.
♪ [MUSIC] ♪
And then, of course, we added some UI to reflect on these actions.
♪ [MUSIC] ♪
At the end of this experimentation,
we ended up with a very flexible way to edit and tweak
a cinematic in a real-game scenario.
Combining features like Cinemachine and Timeline
really allowed us to create a good-looking special attack.
That's all for today's video.
This was just a quick overview of the tools we use
to build this prototype. But if you're interested
in diving deeper and learning more
about the features used to build this demo,
we have a link in the description for a longer training session
within Unity Learn.
Not only that, but you can also download the full project
to play around with it.
Thanks for watching.
♪ [MUSIC] ♪