How To Use VIRTUAL REALITY In Unreal Engine 5 | Beginner Tutorial

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hey what's up creators in this video we're going to be showing you how you can get started with vr game development in unreal engine 5. vr games are incredibly immersive and incredibly fun and creating them in unreal engine 5 could not be simpler throughout this video we're going to be showing you how you can connect the oculus quest 2 to unreal engine so you can preview your games but most importantly we're going to be showing you how you can set up your scenes so they work in vr how to use different controls how to create custom objects that can be picked up in the vr headset by the end of this video you will be on your journey to creating virtual reality experiences inside of unreal engine 5. for this video we are going to be using the quest 2 and the link cable with that being said there is other vr headsets that you can use and all of the skills learned inside of unreal engine 5 are going to be exactly the same regardless of the headset just before we do get into the video what i'd like to see is i want you in the comments down below to let us know what you want to create in virtual reality without further ado let's go ahead and set up a few pre-requisites such as android studio installing the oculus app and getting everything sorted ready to work in vr okay the very first thing that we need to do is we need to download android studio to get our headset working in unreal engine unreal engine 5 currently works with android studio 4.0 not the latest build with that being said on the website developer.android.com go over to download options we're going to go to download archives and then from here we are going to agree to any terms and conditions they have but most importantly what we're looking for is android studio release candidate for so keep scrolling down and what you're going to see is if we find it android studio 4.0 and this is currently dated may 28 2020. go ahead and click on that then what we're going to do is download this make sure you're downloading for windows mac whatever it is that you're using once it's finished downloading we're just going to install this once it's downloaded we're going to go ahead and open this up the process for installing android studio shouldn't take any more than a couple of minutes so what we're going to do is just we're just going to very quickly go through all of this leaving all of the settings to be exactly where they are by default with that done we're going to go ahead and start android studio from here if you're working in unreal engine and vr make sure that you've got android studio open you don't necessarily need to create a project but you do need to have it open let's go ahead and move on to the next step which is downloading the oculus app next we're going to navigate to the next link which is for the oculus app what we need to do is go ahead and download the software what you will notice here is that it's both compatible with air link and the link cable for this i already have the link cable plugged into my quest 2 and into my computer if you're using airlink the process is going to be slightly different go ahead and press download software and again just proceed to open this up as soon as it's finished downloading and then again in here we're just going to follow the usual stuff making sure that we install this now once this has installed we're going to have to set up a oculus developer account which we're going to get into in just a second okay once this is finished installing what we're going to need to do is now connect our oculus to the app the way we can do this is you're going to be prompted by the selected connection method and we're going to choose link cable if you can't get this up for whatever reason go over to the devices tab in the oculus app and you're going to be able to get back to this i'm going to select link cable and then i'm going to press continue with this it says connect your headset if it is connected you should be able to just press continue and then press continue again providing everything set up and because it's all plugged in everything is working and good to go with this you're now going to be taken into the oculus app that looks exactly like this the last thing that we need to do in terms of downloading software is we need to make sure that we've got visual studio installed to do this what we're going to do is head over to the link in the description visualstudio.microsoft.com and download visual studio community 2022 for our computer again just like everything else this is free to download and really easy to install i'm just gonna press next on everything give us a couple of minutes and then we can go into the options and make sure this is set up for unreal engine 5. once this has finished downloading i'm going to go ahead and make sure that i select all of the correct components for me just like i said it is visual studio community that i'm after so i'm going to press install on that if it hasn't come up already then with this we need to make sure we choose a couple of things inside of here so with that what we're going to be doing is just making sure we've got game development with c plus plus in here which is going to allow us to sort of work with unreal engine and you can see in here we've got sort of our intellicode we've got the unreal engine stuff you do not need to enable any of this extra stuff here with that done go ahead and press install it is about seven gigabytes so it is going to take a little while so press install give this about five ten minutes and then we can jump back into this while that's downloading what you also need to make sure you do very quickly is just create an oculus developer account if you google search oculus developer account and then create a developer account on here go through any terms and conditions and then with this log in with your facebook account or whatever it is that you use to log into your headset this must be what you're signed into on your oculus headset i'm not going to go through this process it's really straightforward but make sure you've got this set up from there we're then going to be able to go into developer mode in our vr headset and get started in unreal engine okay so that's everything installed now let's move on to the next section where we show you how to enable developer mode on your quest to headset okay from here what we now need to do is go to our oculus app go down to devices then developer mode and switch this on from here we're ready to dive into unreal engine 5. okay now that we've got unreal engine let's go ahead and get this running so first things first to access your vr preview we can access this by going to the little drop down arrows here and choosing the vr preview if we press this it's then going to put us into the game and with that it really is as simple as just picking up the headset turning it on and then from there we're able to move around and with this i can use the right stick to move around so point and aim to choose where i can go and then of course the headset's tracking and if i wanted to i can also just use the grip button to start gripping and picking up objects and i can start firing um it's not just guns that i can pick up i can also pick up things like cubes and we're good to go so our vr preview is working in terms of troubleshooting to make sure the vr headset is working and shows up in the vr preview there first of all make sure that you've got android studio open secondly make sure the headset is connected to a usb free port or a type c if that's what you're using for your link cable in addition to that you also need to make sure you've got developer mode enabled on the headset and you also need to make sure that you put the headset on once already and allowed the computer to take control over the link cable you'll automatically get a prompt for that with all of those checks in place and you followed everything in the video you are going to have that vr preview available to you there okay now that we have our vr working inside of unreal engine let's go ahead and show you how you can get your vr set up in a fresh scene and how you can create custom objects that can be picked up to do this we just go ahead and create a brand new level or if you have a level already by all means you can go ahead and use this what you will find if you go ahead and open up the vr preview right now everything looks really messy here we aren't able to control we aren't able to move around and we also can't teleport and if i was to go ahead and stick my headset on just for a second here and hop into this you can see i've not really got anything i can do here i'm just floating in free space with that being said what we need to do is set up a couple of things the first of which is we need to actually set up a vr pawn to do this what we're going to do is we're going to go ahead and navigate to our vr template folder in the content which will have came with your vr template and with this we are then going to drag this and put it on the floor you will have to move this up ever so slightly but having done that now if we go into our preview put our head mounted display on [Music] we are going to be able to see that while we are able to do the whole aiming thing what we can't do is actually possess this to possess this really straightforward all we need to do is with this vr pawn simply go to auto possess player and set this to player zero now if we go into our preview hop into the head mounted display you can see we are now in the location of that pawn i can't move around currently and that's simply just because i don't have any sort of navigatable area but with this we've now got our pawn we can look around and if we have room scale enabled we can actually move around in room scale space but let's go ahead and get it so you can teleport to do this we need to set up what's called a nav mesh volume to do this we are going to go over to our place actors tab we're going to go to volumes and we're going to create a nav mesh bound volume and with this we're just going to place this within our scene and we are going to scale this up so it covers the entire playable area here if i now go ahead and move this down making sure that it intersects with the floor there we can see we have got this big green area this is the area which the player can traverse they can actually travel on to now just a thing to note if you can't see this big green square section here what you need to do is press p on your keyboard to go ahead and activate this with this done if we were to place any kind of object into our scene you are going to see it is going to create a cut out so the player can't actually walk there so it takes collision into account with this and if you had things like stairs in here or any kind of geometry for things like that you're going to be able to see the nav mesh is going to be able to go over those stairs so now we know how to put this into a new level let's go ahead and with this go into this play mode and test it out [Music] as you can see here now as i use my right joystick here to sort of aim where i want to teleport i can teleport anywhere within that area if i go ahead and turn round back to my stairs i can go towards those and if i keep teleporting you're going to notice we can only go so far up to this sphere just like it showed us in the nav mesh what i can also do is start traveling up the stairs because we have the nav mesh for that so with that being said we now know how we can set up our vr to work in a custom scene let's go ahead and move on to the next piece where we show you how to create pickup actors those being things that we can actually pick up from the ground in our hand okay so within unreal engine we need to open up our grabbable blueprint class this comes as part of the starter content with your vr project you can find this underneath content vr template and blueprints inside here you are going to have grabbable underscore small cube we can duplicate this and have multiple different types of grabbable items i'm going to right click duplicate and i'm just going to call this grabable underscore chair because what i'm going to be doing is taking this chair and making it so we can actually pick that chair up we've currently got this cube in this grabable so double click on this then within here in our viewports we need to select our cube and we can change this to any static mesh that we have we've got cylinders we've got doors we've got chairs we've got lamps we have got absolutely anything so actually rather than a chair let me just put an sm underscore statue here and now we have a blueprint with our static mesh in which is a statue along with our grab component which is actually going to allow us to pick it up so with this let's go ahead and take this blueprint and i'm just going to put a couple of these on the floor i am going to scale these up to make them a little bit bigger so they're easier to pick up and i'm just going to place a couple of these throughout my scene then i'm going to play in the viewport here if it's giving you that error there that's most likely because you need to save and you need to compile that okay once we're inside here we're gonna head on over to our statues by again just using that right joystick to get in here teleport and move around and don't forget we can also use that left joystick to rotate our head mounted display i'm going to get nice and close to my statue hold down my left trigger to grab it and you can see i can now pick this up and i can let go of it i can pick it up and i can do this as many times as i like and i can even throw it if i wanted to and it's the same thing for this one over here again i just pick it up i can inspect it and i can do absolutely anything with this that is how we can create pickup actors all you need to do is just recreate that blueprint class there and then from that what we do is simply go in and change that static mesh there is a lot more to learn about pickup actors such as getting it to snap to certain points in your hand for things like guns or swords or weapons but we will cover that in a later video if we get enough of you guys saying that's what you want to see in the comments down below in this next section we're going to be showing you how you can take assets from an existing project and migrate them easily into your vr project where you can use the head mounted display pick objects up and do all kinds of fun vr stuff i'm gonna be just taking a couple of assets from this you can use as many as you like or you can even port over entire levels if that's something that you want to do for me i'm just going to be taking this chair and this cushion migrating them to another project could not be easier with unreal engine all you need to do is right click on the object in the scene to find it in the content browser with this just double click on this to make sure that it's got a material i can see that's working there to migrate it i can right click and go to asset actions and migrate what this is going to do is take the assets of the 3d model plus any dependencies which means the textures and the materials and take them to your new project with this i can then press ok i can see all of the dependencies for this and press ok and what we're going to do is we're going to navigate to our vr project so for me that's virtus vr demo and then we want to make sure we are within the content folder we can then go ahead and press select folder and this is going to move all of our assets over and we can see a little message in the bottom right hand corner that says content migration completed successfully we can then do the same thing for the chair too again to migrate it right click on that asset and press browse to asset to find it in our content browser we're then going to right click on the asset in the content browser go to asset actions and migrate it's going to show you a list of all of the dependencies press ok and then from here again navigate to the content folder within your new project and press select folder once that's done go ahead and press yes if there's any sort of conflicts there because we're just using the same material there for a few things and we're going to close this down and open up our existing vr project that we've just migrated all of this to once we get back inside of our vr project we can now take those assets in because they are in our content browser to access these what we're going to do is go down to the bottom left hand corner and we're just going to hit that all folder typically our meshes are going to be within a newly created migrated folder but what i'm going to do is i'm just going to go to all and search for chair and i'm also going to enable my static mesh filter there so that way it shows all of my static meshes with the name chair and now we can see we've got that asset from before give it a couple of seconds it's going to compile the shaders so we can see all of the materials and textures are working which i can see up here once that's done what i can do is simply just take it into my scene drag and drop and place it wherever i like so i can place that in there if we have the cushion again we can search for that by name or any asset that you've done so you just need to find the spelling of that find it in your content browser and place it in wherever it is so i can see here i've got my pillow and again i can just place that into my scene fresh out of that other project with that being done just like before one last time we can open this up in the vr view by pressing the play button then once we're inside of here just like before we can navigate around and we can see this very high quality asset that we got from a content sample that i downloaded off the marketplace so i can see there i've got my cushion i've got my chair and it all looks really really detailed that's it for this video i hope you have enjoyed it there is plenty more to learn when it comes to virtual reality in unreal engine i definitely advise you go ahead and check out my world building and blueprint videos to help you take your vr game to the next level if you have any questions relating to vr go ahead and join our discord server the link's the words in the description there's over 5000 like-minded unreal engine developers just like yourself if you'd like to support more content just like this and unlock exclusive perks such as early access to our videos live mentoring and ready to use game templates go ahead and check us out on patreon the links are in the description down below that's it for this video as always stay awesome keep creating fertis signing out [Music]
Info
Channel: Virtus Learning Hub
Views: 97,506
Rating: undefined out of 5
Keywords: Virtus Creative Hub, virtus creative hub, unreal engine tutorial, unreal engine, unreal, vr games, vr in unreal engine 5, unreal engine 5 tutorial, unreal engine 5 beginner tutorial, unreal engine 5 beginner, ue5 tutorial, unreal engine 5 tutorial for beginners, ue5 tutorial for beginners, unreal engine beginner tutorial, unreal engine 5 tutorial beginner, unreal engine 5 tutorial beginners, vr unreal engine 5, unreal engine 5, virtual reality, vr, ue5, ue5 vr, unreal engine vr
Id: DiGh6MxDFds
Channel Id: undefined
Length: 20min 18sec (1218 seconds)
Published: Fri Jul 15 2022
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.