WEBVTT

00:07.180 --> 00:07.930
Welcome.

00:07.930 --> 00:14.680
In this video we're going to add a Niagara system for when we click with a short press so we can see

00:14.680 --> 00:16.240
where we're running to.

00:16.240 --> 00:22.210
And it's just a little bit more satisfying when you have a little bit of a particle system to see whenever

00:22.210 --> 00:23.470
you click on the ground.

00:23.740 --> 00:28.300
This is something we probably should have done a while ago, but that's okay.

00:28.330 --> 00:29.830
It's kind of a Polish item.

00:29.830 --> 00:36.010
Anyway, let's go into our player controller or a player controller, and we're going to add a Niagara

00:36.010 --> 00:41.950
system variable so we can go ahead and add just down here at the bottom.

00:41.950 --> 00:44.830
Doesn't even have to be protected or public.

00:44.830 --> 00:46.210
We can make it private.

00:46.450 --> 00:48.670
I'm going to put it right under the spline.

00:48.700 --> 00:50.650
It's going to be a t object pointer.

00:50.650 --> 00:52.900
And this will be a U Niagara system.

00:54.130 --> 00:56.950
I'll go ahead and add the forward declaration for it.

00:56.980 --> 01:00.910
And this will be click Niagara System.

01:01.210 --> 01:04.480
And I'll give it a U property with edit defaults only.

01:04.480 --> 01:07.360
And we'll set that Niagara system in blueprint.

01:07.360 --> 01:09.970
Now where are we going to spawn it.

01:09.970 --> 01:16.000
Well we don't want to do it when we press because this might be pressing and holding.

01:16.000 --> 01:20.680
And I don't want to show that system when we're holding our mouse button down.

01:20.680 --> 01:23.320
I only want to do it when there's a short press.

01:23.350 --> 01:30.730
So for that I'm going to go to Ability Input Tag released after we check to see if it was a short press,

01:30.910 --> 01:33.910
if the follow time was less than short press threshold.

01:33.910 --> 01:37.870
So inside this if statement and I'll do it right here at the bottom.

01:37.870 --> 01:39.640
And I'm just going to spawn a system.

01:39.640 --> 01:40.830
And I can do that with U.

01:40.870 --> 01:45.790
Niagara function library spawn system at location.

01:45.790 --> 01:48.580
And it requires a world context object.

01:48.580 --> 01:53.560
We can pass in the player controller, and I'll pass in click Niagara system.

01:53.560 --> 01:58.900
And for the location it's going to be our cached destination.

01:58.900 --> 02:03.670
So we've cached that destination and none of the other inputs are necessary.

02:03.670 --> 02:05.500
So that's all we need.

02:05.800 --> 02:13.420
So we can go ahead and compile and launch set that click Niagara system in the player controller and

02:13.420 --> 02:14.200
test it out.

02:17.610 --> 02:24.570
Okay, so back in the editor I'm going to open my player folder, open my aura player controller, scroll

02:24.570 --> 02:28.020
down until I find Click Niagara system.

02:28.020 --> 02:31.110
Now our project has an FPS cursor.

02:31.260 --> 02:33.600
We can see what it looks like by opening it up.

02:34.390 --> 02:38.630
It's basically kind of like the one in the top down template project.

02:38.650 --> 02:41.320
It just uses a different texture and color.

02:41.470 --> 02:43.150
So let's see how this looks.

02:44.750 --> 02:45.590
There we go.

02:45.590 --> 02:50.930
Now, if you were wondering why you weren't getting click to move over here, but if you move over here,

02:50.930 --> 02:52.420
you get click to move.

02:52.430 --> 02:54.230
Well, remember we moved.

02:54.230 --> 02:55.190
Or at least I did.

02:55.190 --> 02:56.240
I don't know if you did.

02:56.270 --> 03:02.030
We moved our nav mesh bounds volume over so those enemies wouldn't be hurting us.

03:02.030 --> 03:08.480
And that nav mesh bounds volume is very much necessary if you want to create a path.

03:08.480 --> 03:10.430
And that's what we're doing for click to move.

03:10.430 --> 03:11.600
We're creating a path.

03:11.600 --> 03:15.080
So we need that if we're going to have click to move.

03:15.080 --> 03:20.840
And now that click to move is using a Niagara system, we can see what it looks like.

03:20.840 --> 03:22.970
And it looks actually pretty satisfying.

03:22.970 --> 03:25.430
It makes you more incentivized to click.

03:29.580 --> 03:30.270
Looks good.

03:31.810 --> 03:32.980
I like it.

03:34.790 --> 03:35.540
All right.

03:35.540 --> 03:38.460
And with that that's going to conclude this video.

03:38.480 --> 03:40.730
I'll see you in the next one.
