Unreal Engine Beginner Tutorial Lesson 1

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
okay so this is a test run uh for my tutorials and first we're going to create a new project so you open up your tutorial open up your unreal and then go to games and then we will make um let's do something in first person so project name to tutorial we're gonna use blueprint mainly normally I make VR projects but I'm going to make a first person project just it makes testing easier when I'm uh trying to demonstrate some of these principles in game design because a lot of you're going to use the same mechanics a lot of the time and whether it's first person third person uh BR I mean there's a lot of differences too but some are some aren't the same so sometimes it will um give you a template already to start with but if you want to start from scratch go to new level and then pick one you can do open world you can do basic um let's just do basic so this just gives me like just a platform a plane to work on the open world would give you a lot more space but we'll keep it simple so to this is our project this is the contact content drawer this is where all your folders are this is where you're going to create things and pull things from this is the outliner which shows all the objects that are actually in your scene at the moment and right now we have a lighting we have the sky and the fog and the atmosphere and all that um so to start we're going to create a folder so go to your content drawer and create a folder a new folder how I did that sorry I'm going too fast is I right click on in this window and then I go to new folder and I'm going to name it Well for now I'm gonna just adjusters it's pretty uh generic but that's what we're going to be making so actors are objects that you're gonna or blueprints that you're going to be placing in the scene um there are objects that you're usually going to add mechanics to um so let's go ahead and do that see actors is an object that can be placed or spawned in the world so I don't really have a set plan but just going over the basics so it's gonna be a pretty generic title but you know actor one blueprint all right and click on that and so this is going to bring up um I'm not exactly sure what they call this but I called the blueprint window but I guess this is the view part and then you have the event graph so this is where you would do your blueprinting right here on this tab and then this is where you would actually see the object um this is where it holds all your variables this holds all your events and then this holds all the objects in the scene and then these are your like preferences and then here are some events that you can use on each of the objects so um let's go ahead and create an object I like to do a scene first that way it's I can kind of offset the object if I um I mean it's just easier to move in place without losing the Integrity of you know having the zero zero zero location for the factor um just put a simple object in there for now so this is just a simple Cube I added it in by clicking on ADD and then added if you want to add your own custom mesh I'll show you how to do that too go ahead and compile save so now I have an actor here and I can bring it into the scene so there's our actor doesn't do anything yet what do I want it to do that's the question so um we can just go over some basics what I can do with it alright so I probably want do you want physics on the cube if you want physics you would simulate physics and then okay and then do you want gravity on it because if you want it to fall you leave this checks but if you don't want it to and you want it to just float you would uncheck that Let's test this so I took off gravity but it simulates physics so if I touch it with something else it's gonna like float off into space uh let's test that so how I'm going to test that is I'm going to go over here in the outliner while it's in play and I'm gonna grab the second actor I'm going to move its location or position in real time so that it hits the other actor I'm going in the wrong direction there we go see so it hit each other and so now they're flying off they don't have gravity on them so they're just kind of floating as if they're like on a planet that doesn't have any gravity so if I wanted gravity on it I would hit that I've hit save compile play and now they fall to the ground um sometimes they might fall through the ground and that would be because the ground does not have uh you know you can clip it so you have to add a collision to it um these services that come with the template usually already have that capability but let's um let's let's test that real quick let's say I just bring in a random object in here a cube this is an another this is a new Cube this is not my actor Cube this is something it's like a generic Cube pulled into the scene we can change the color on it so we don't get confused um let's save this map I try to save it and now it wants me to save the scene so we're going to save this as tutorial one let's see I actually probably want to create a folder a scene folder save it in all right so it looks like that actually already has a collision on it let's say we don't want a collision on this if we want it to go through the floor we could just go to normally I'd be clicking on the actor itself and changing this into in the you know the prefab but uh right now I'm actually changing the object and the scene and using the preferences and the scene because I'm going to end up deleting this anyway so it doesn't really matter it's just temporary just to show you so um where is it I'm always losing it here it is okay sorry so right here we decide what kind of collision we want so if we want no Collision like we don't want anything to be able to uh collide with it and we had no Collision save that play now things go right through it um you can there's like different Collision preferences so for instance I could block everything or I could only block like object um block the player or and and then I could let all the objects overlap or I could only uh block objects and then let the player overlap um there's a bunch of different um preferences that you could that you could pick depending on like what you needed it for so go ahead and delete this object I don't need it so we have two physics objects um let's see if we can interact with them I think when you do first person they automatically have the settings where you can move yeah so using w a d s you can move around it's already preset in there so yeah if I run into that then they they interact all right so now let's do a blueprint let's add a box Collision so go to add go to box Collision make that big enough to cover up the space of your objects we're gonna make it visible so you can see it we're just gonna uncheck hidden game so that it's not a hit Ending game so you can actually see the Box collision and I'll show you what that looks like see you can see the Box Collision Okay so go to uh event graph click on your box Collision all right now these are some events that could happen so like let's say if we click on it it's this box is clicked then something's gonna happen so we gotta we gotta figure out we gotta decide what we want to happen um so if you right click in this window a bunch of actions will come up these are a bunch of options that you could pick from you usually you kind of have an idea of what you want to do and you can just type it in it'll pull it up for you and you can find it if you want more options you can uncheck that so um what do we want to do maybe I want the component to move so I just typed in move component and it's going to pull up move component too so for this one when I click on it it's going to move to a spot that my choosing so I'm going to go ahead and attach this on click to move and then it needs to know what component we're moving so I'm going to drag Cube over see here and then I'm going to attach it and then now I need to know what location it's going to be moving to I need to decide what that is I say let's get its original position and then add like uh some space or some um you know spaced on it uh I can't think right now okay basically what we're gonna do is we're gonna find out what its original location is so find worlds location where we're just put in World location I'm pretty sure it's get a world location and um then we're gonna click on this little yellow guy drag it over and then click on ADD or I mean type in add go to operators add an ad so this is going to um actually go ahead right right let's do this so what you do I want you to unhook that if you hooked it up and what you how you do that is you just um I have to remember you hit alt and you click on the line like that and I'll disconnect it Okay so right click on this yellow thing and go to split struck that way it like I uh and and I can't talk right now it unfolds it's where you see all of the options so it separates them so it's not just one vector it's not a vector three it's now um three different floats for x y and z so that way we can just affect one of them instead of all of them so I'm if I wanted to move like on the y-axis say I just want it to move like 10 spots so now what it's going to do is it's gonna get uh this location or wherever this is and then it's going to move it here but it's gonna do it every time I click on it so it's gonna move it 10 spots on the Y let's just test it it's not working let's figure out why I need a timeline so it's add timeline click on the timeline add a track go to add floats then right click add key right click again add another key move that up here and save that all right let's test it so I'm not sure why the click wasn't working but the big end overlap does work so this does work uh this part Works The Click did not work we'll figure it out why but for now we're going to do begin overlap so whenever my player overlaps those boxes it will move and first we're gonna um make sure that it only happens when our player overlaps so how we do that is we're gonna on play begin we are gonna get actor of class we're gonna select uh the name of the of the player just make sure we know which one that is PPU first person character and then you're gonna go to um set actor so actually we're going to add a variable and then you're going to change it to actor and you change over here I mean you drag it over here and go to set so drag it here click on sets and connect these and then you're gonna go to cast to BP first person character and then connect that and then now drag this over here so you're going to copy this drag it here connect those go to other actor connect that to object and then connect that to the timeline so now whenever I overlap those boxes it moves to whatever spot I told it to actually I should hook these up more so um I'm split this struck and then hook these up now now let's try it now every time I run into it it's gonna move like 10 spots well now it's not doing it huh I wonder why that is so um let's make this box bigger and maybe make making the closing box bigger so that I run into it sooner and then I want to make the distance longer so that's more obvious so turn it to 20. so now I'm gonna when I overlap those trigger boxes or Collision boxes it sure is that events for some reason it only does it once I don't even have it set to only once let's figure this out so I think it's because whenever it Begins the overlap we need to like how that doesn't explain it hmm it's too weird all right I think what why is I'm gonna actually separate the event from this and turn it into a an end switch variable so um on end overlap just right here click on that whenever it stops all right go ahead and unhook this using alts drag us over this is going to be as an event so drag this and go to custom events we're going to name this uh move 10 or 20 spots all right now um click on it go to rename and copy the name and then right click over here and then um paste it in and I'll just automatically come up and then click on it this is the event that will happen uh so now we need to go over to um add and and uh we're going to add an integer and we're gonna call it move change the variable to an end okay now right click in the window and go to in go to switch on ends we'll just put this on update for now and then you're gonna add in uh add in some pens we're gonna make this one and then I want you to drag move and go to uh set and then connect those and this one's gonna be um set to zero actually this one's gonna be set to one and this one's gonna be set to zero so what this does is whenever this happens like when it's overlapped by the character it's going to set this integer to one when this integer is set to one this is event Tech which means everything that happens after event tick is constantly updated so it's constantly writing the script we don't want things on tick but we're just doing this for testing slows down the game but we're gonna um just get it we're gonna so you drag us over and hit get and then connect that and then so now if it changes this it's going to read it from here and it's going to switch on the actions and then do whatever event follows I'm just going to test looks like it never stops now that I I did that now okay uh it's never ending we can actually see what's going on um we can actually watch The Script while it's playing so just go over here and click on one of the actors but we could see what's running so it's in here saying zero so there's got to be a way to switch it them right now for some reason it's when I'm ending the overlap oh wait maybe that's why so I'd overlap component instead of other actor let's try it again yeah so it stopped and then starts again wait does it yeah yeah so that worked
Info
Channel: The Shoun Files
Views: 1,195
Rating: undefined out of 5
Keywords: Unreal Engine Beginner Tutorial, unreal engine, unreal tutorial, unreal engine tutorial, beginner tutorial, unreal engine 5, move component to
Id: GkuDh8A3vzU
Channel Id: undefined
Length: 37min 50sec (2270 seconds)
Published: Sat Aug 12 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.