WEBVTT

00:06.840 --> 00:07.890
Welcome back.

00:08.130 --> 00:10.860
Now, in this video, we're going to be adding some juice.

00:10.890 --> 00:11.690
What does that mean?

00:11.700 --> 00:17.190
Well, if we have our shaman summon some minions, they all just pop in, and that's boring.

00:17.190 --> 00:19.380
It doesn't really look all that great.

00:20.010 --> 00:23.690
Now, what do games do to make this look better?

00:23.700 --> 00:25.500
Well, all kinds of things.

00:25.500 --> 00:28.380
You can use some particle effects.

00:28.380 --> 00:29.550
We're doing that here.

00:29.550 --> 00:35.400
But we could spawn in more effects, have them come in with a poof of smoke or something like that.

00:35.490 --> 00:38.580
Another thing is they could use animations.

00:38.580 --> 00:42.360
They might have a summon animation, maybe for skeletons.

00:42.360 --> 00:45.690
They crawl up out of the ground, things like that.

00:45.720 --> 00:46.530
But what if you do?

00:46.530 --> 00:47.730
If you don't have any of those?

00:47.730 --> 00:50.820
What if you don't have animation skills or an animator?

00:50.850 --> 00:55.080
You don't have the money to spend on a nice particle system?

00:55.080 --> 00:59.430
Well, there's other ways to add what we call juice.

00:59.460 --> 01:01.980
Juice is what makes a game juicy.

01:01.980 --> 01:03.030
What makes it more fun?

01:03.030 --> 01:05.130
What makes it look more attractive?

01:05.160 --> 01:08.820
How can we make them pop in in a more attractive manner?

01:08.910 --> 01:15.630
Now, one way to really easily add juice and it doesn't cost anything is by Tweening.

01:15.660 --> 01:22.530
Tweening is kind of a name for interpolation or interpolation like behavior.

01:22.710 --> 01:28.740
Let's close some of our tabs and we'll see exactly what we mean by Tweening I'm going to go into Blueprints

01:28.740 --> 01:34.470
character and just open our enemy base and I'm going to do something and begin play.

01:34.470 --> 01:38.070
So looks like Begin Play is right here.

01:38.100 --> 01:43.050
I'm going to drag it on up and just because I don't like these other grayed out nodes, I'm going to

01:43.050 --> 01:43.950
delete them.

01:43.950 --> 01:46.260
And what are we going to do for begin play?

01:46.260 --> 01:48.410
We're going to do some tweening.

01:48.420 --> 01:55.080
Now Tweening is taking two values and getting a value in between both of them.

01:55.080 --> 02:01.290
In other words, it's an interpolation tactic, but we use the term a little bit more broadly than that

02:01.320 --> 02:03.810
rather than just using it for interpolation.

02:03.810 --> 02:07.170
We can use timelines and curves and all kinds of cool stuff.

02:07.200 --> 02:13.560
I'm going to make a timeline, so I'm going to right click type timeline, scroll down and choose add

02:13.590 --> 02:14.460
timeline.

02:14.460 --> 02:20.400
We're going to call this spawn timeline and in Begin play, we're going to play it and we can double

02:20.500 --> 02:22.450
click the timeline to add a track.

02:22.450 --> 02:30.790
I'm going to add a float track and call this scale track because I'd like to add a curve here that we

02:30.790 --> 02:33.240
can use to scale our character.

02:33.250 --> 02:39.610
So I'm going to right click and add a key and at time zero, I'm going to set the value to zero.

02:39.700 --> 02:46.420
And what I'd like to do is use this curve to scale our character, make it pop out, but I'd like it

02:46.420 --> 02:47.920
to sort of bounce a little bit.

02:47.920 --> 02:48.760
Kind of wobble.

02:48.760 --> 02:50.620
That's the juice I'm talking about.

02:50.620 --> 02:56.740
So what I'll do is I'll add another key and this will be at time 0.1.

02:56.740 --> 02:58.090
So fairly quick.

02:58.090 --> 03:02.590
And I'm going to select both of these keys, right click and Choose Auto.

03:02.590 --> 03:07.540
And that way we have handles on them when we click on them and we can shape the curve.

03:07.540 --> 03:14.710
If I click on this handle and angle it upward and click on this handle and angle it upward, look at

03:14.710 --> 03:15.190
that.

03:15.190 --> 03:23.320
Now our curve goes up like this, and I want it to go up to just above one as a scale of one is just

03:23.320 --> 03:26.410
the regular scale for our characters.

03:26.410 --> 03:32.500
So I'm going to make these go up quite high and I'm going to zoom to fit vertical.

03:32.960 --> 03:35.750
And I can see that I'm about 1.5 here.

03:35.750 --> 03:40.030
That's about how high I want to go, about 1.5.

03:40.040 --> 03:42.650
And this is quite fast.

03:42.650 --> 03:50.240
So here at time 1.5, our scale is going to go way up and way back down.

03:50.240 --> 03:51.650
Now, I want an undershoot.

03:51.650 --> 03:53.590
I want it to kind of wobble here.

03:53.600 --> 03:58.700
I'm also going to zoom to fit horizontal so we can see this curve and control it a little bit easier

03:58.700 --> 03:59.300
here.

03:59.480 --> 04:03.260
So I want it to be something like this.

04:05.990 --> 04:09.470
All the way up to a little over 1.5.

04:09.470 --> 04:13.250
And to get an undershoot, I'm going to add another curve.

04:13.250 --> 04:15.200
So right about here.

04:16.780 --> 04:19.600
This will be at, let's just say 0.2.

04:20.290 --> 04:27.880
And we'll see that we have a nice undershoot there and we can even add another curve over near 0.3 seconds.

04:31.420 --> 04:37.750
Make sure that's an auto curve and then we can make this have a bit of an overshoot.

04:39.370 --> 04:39.790
Like.

04:39.790 --> 04:44.020
So I'm going to go ahead and zoom to fit on both dimensions.

04:44.020 --> 04:46.480
And now we have this kind of wobble.

04:46.660 --> 04:50.680
Now we can use this curve to set the scale of our enemy.

04:50.830 --> 04:53.860
So what we'll do is back to the event graph.

04:53.890 --> 05:00.430
We'll take this timeline and we'll take our scale track and we're going to make a vector out of it.

05:00.520 --> 05:03.730
So we're going to drag off type make vector.

05:04.790 --> 05:10.490
And we're going to use the scale for X, Y and Z of the vector and use this vector to set the scale

05:10.490 --> 05:11.440
of our mesh.

05:11.450 --> 05:18.020
We're going to drag out, take our mesh and call set relative scale 3D.

05:19.480 --> 05:20.860
Like that.

05:21.040 --> 05:25.300
And on update, we'll use that curve value.

05:25.330 --> 05:30.520
Now at the end of the curve, we should end up at a scale of one, right?

05:30.520 --> 05:36.520
So what we should actually do is take these points, not the first one, but all these other ones,

05:36.520 --> 05:41.490
and move them up so that they end up centering on one.

05:41.500 --> 05:46.540
So I'm going to drag them up like this and I'm going to click on the last one and make sure that its

05:46.540 --> 05:49.030
value is exactly one.

05:49.360 --> 05:55.360
So that way we'll go up to about two, but we don't have to overshoot quite that high.

05:55.390 --> 06:03.760
I'd like to overshoot to about 1.5, 1.6 or so, and we'll have an overshoot undershoot and then settle

06:03.760 --> 06:05.650
back in on one.

06:05.650 --> 06:09.640
And that way, by the end of the timeline, we're at a scale of one.

06:10.060 --> 06:10.930
Okay?

06:10.930 --> 06:12.760
Now we can just test this out.

06:14.670 --> 06:16.860
So we're going to press play.

06:16.890 --> 06:19.710
Now, it did happen there, but there we go.

06:19.710 --> 06:23.490
It's happening for our enemies as they spawn in.

06:23.520 --> 06:27.990
Yes, it happens for our shaman at the very beginning, but that's okay.

06:28.910 --> 06:34.880
Now this overshoot is a little bit extreme, so we can always tweak it.

06:35.000 --> 06:40.460
I'm going to open that timeline and we're going to make this overshoot just a little bit less extreme.

06:40.460 --> 06:43.070
Let's go to perhaps.

06:44.580 --> 06:48.270
This amount and a little bit less actually.

06:48.270 --> 06:50.750
We'll leave that undershoot extreme like that.

06:50.760 --> 06:52.080
Let's see how this looks.

06:55.120 --> 06:55.990
That's better.

06:56.320 --> 06:59.530
The undershoot could be a little less extreme, too.

07:01.190 --> 07:02.510
So we'll just tweak this.

07:02.510 --> 07:05.300
Let's zoom to fit horizontal there.

07:07.210 --> 07:14.200
And I like to sometimes make this area smaller, so it's a little easier to see the difference here.

07:20.260 --> 07:22.090
That is a little bit better.

07:27.630 --> 07:31.590
So we'll make this settle in at one right there at the end.

07:34.370 --> 07:36.200
Yeah, that's looking pretty good.

07:38.890 --> 07:39.760
Excellent.

07:41.670 --> 07:47.220
And if you really wanted to, you could have different tracks for different dimensions.

07:47.220 --> 07:49.290
This could be for the Z scale.

07:49.290 --> 07:53.810
We could also have a different track for X and Y.

07:53.820 --> 07:56.420
So we have a scale track, right?

07:56.430 --> 08:02.520
This could be scale track Z, and then we could have a scale track horizontally if we wanted to poof

08:02.520 --> 08:07.640
out a little fatter and it'll look a little bit less like we're scaling upward.

08:07.650 --> 08:11.010
Also, we're scaling up from the origin of the actor as well.

08:12.900 --> 08:18.450
But we got tweening and now our summoning is a little bit more juicy.

08:20.080 --> 08:21.130
That looks great.

08:21.430 --> 08:22.960
So excellent job.

08:22.990 --> 08:24.640
I'll see you in the next video.
