How to Make a Simple Turret in Unreal Engine 5

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
what's up guys welcome to new Unreal Engine 5 so today I'm going to show you how to make a turret it's gonna be a very easy build to follow so let's get started all right so the first thing that we need is our tour model in my case I have left this free Link in description with a turn model from SketchUp so I want to use the same one as me go ahead or if you want to choose a different one go ahead but let's go ahead and just drag this folder into our content browser let's just reset everything to default but now and go into mesh and go into advanced we have to make sure that combined matches it through now we can import all and we'll have a warning it's okay but now we have our third let's go ahead and just apply the um textures into the material so double click open this up just drag this one which I guess is the um this is the Albedo let's pass that into the base color then we will have the metallic smoothness so it's going to metallic and then finally the normal just put that in normal and then we can use Supply and that should be it I guess that's that's perfect okay so now we can close this alright so now let's actually go and continue I'm gonna actually do actually doing here so what I have to do now is right click go into blueprint class and create a new active it's going to be placed in the world I'm going to be naming this VP underscore turret or whatever you want to call this turino to it there you go and uh let's open this blueprint up so the first thing that we're going to add is basically our static mesh it's going to be basically the turret that I just imported thread there we go and now we'll have to put it into position so uh through that in 90 degrees and put it a bit up we'll see if we have to change the scale in a second we'll play around with those settings but you can see the ones that I have here so basically the first thing I'll have to make sure is that our third can detect um basically objects in its way so it will be able to detect if a player is in front so we're going to be using the same system that I use for my simple AIS it's going to be the pound sentencing component this will be able to detect players so we can just put the side radius to be way smaller maybe on 2 000 more that's maybe too low I will see but then division drop it down to 70 this is only in this area you know actually that's pretty big too like the distance oh play around with this settings okay you can really just change the side radius and the ankle okay um sorry side yeah side radius basically the distance so now we're going to do is go on C pong so basically when you can delete everything else when this story detects a new object I'm gonna be making sure that it is our third person controller or whatever character blueprint you have of course if you want to attack other actors that are not the third person character you can basically skip this part over here but um what we are going to do now is basically is aim towards it so we can do is set actor rotation there we go set back to rotation and now the new rotation will be we can use this node to find the the rotation between two points the start point will be this one so get actor location so now rotation can be location and the Target location will be well the one from the bone so get actor location so it will be basically moving and aiming towards us so now of course I have to pitch a place in the world before I press play see okay this is very tiny let's make it way bigger so maybe let's lock this and put this on maybe to 10 while I know that's huge no wow that's huge uh maybe four I like that a bit more um ef4 is perfect so let me just put it here and maybe just put it over there so it's looking that way okay so I'm gonna press play and now it's not seeing me but once I enter here it still doesn't do anything okay and the reason that's moved is because this is an actor and it has to be a part sorry I made this mistake but what we have to do is to go into class settings and we can change the pairing class to be Pawn instead and it'll be minimal Palm can compile press play and now you see that when I get into his area he will start looking at me now you can see that he's doing a very weird thing instead of lagging a lot now this is because of his sensing interval in the pump setting so we can go and decrease the this to zero point zero five and it will be basically detecting more frequently therefore the lookout will be way smoother as you can see so now we'll be aiming at us that's great now Leslie has to shoot it so we can do it actually has so our location we can now go ahead and just make a bit of a delay we'll see what we add but basically um go ahead and spawn an actor from class okay in this case we'll have to do another class which will be uh this time we can yes to make an also a pound just in case as though the BP underscore and with the bullet itself okay this bullet will mean nothing crazy basically you say sphere uh squash as simple as that and way smarter so maybe 0.2 .2 and yeah 0.05 that's good um then we're going to do is add the projectile movement component and just add animation speed of maybe a thousand and isolation of 1500. we'll see how that goes and but with that that should basically work so we had to pass here BP underscore bullet and then we have to pass a uh transform so where it needs to be spawned well basically we can go inside the mesh and create an arrow and then place our Arrow just basically on the tip of our section here okay you can actually make it a bit more into here just in case it is big and it collides so maybe a bit forward and I'm gonna get this arrow and you say get transform and then this will be the welt transform and I can just plug that on there uh and with that said I can use press play and basically if I go here you can see the now is shooting me the bullets and they're hitting me and everything uh now I did for you know made the mistake of doing it in the wrong direction so the 0.05 has actually to be actually let's get the log out so when two and the 0.05 has to be as like this now 0.05 here in the uh x-axis okay and now you can see that it Buzz will be flying towards perfectly and that's great so now we have little control done maybe it's a bit over the ground so basically you just put it a bit into the floor you can actually change the blueprint height for me and of course you can change the uh so that's it guys [Music] [Music]
Info
Channel: Gorka Games
Views: 24,459
Rating: undefined out of 5
Keywords: games, videojuegos, unreal engine, unreal engine 5, ue5 turret, tutorial, quixel, megascans, unreal engine make turret, turret tutorial ue5, ue5 turret simple tutorial, ue5 turret fire player tutorial, how to make a turret in unreal, unreal engine 5 how to create a turret, simple ai turret, turret ai tutorial
Id: x5k1gcJ7zi8
Channel Id: undefined
Length: 7min 15sec (435 seconds)
Published: Thu Jun 01 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.