Creating for the Meta Quest 3 with Unreal Engine 5

Creating for the Meta Quest 3 with Unreal Engine 5


Introduction

The Meta Quest is a head-mounted standalone system, which is a gateway to experiencing digital actuality (VR). It’s now coming into into its third technology, often called Meta Quest 3. It may be developed with sport engines — akin to Unity and Unreal Engine — that give you prepared instruments for stereo shows and movement monitoring.

This tutorial begins your improvement for the Meta Quest 3 in Unreal Engine 5 (UE5).

VR platforms are primarily supported in UE5 through the OpenXR API plugin. Alternatively, the Meta Quest XR Plugin supplies one other all-in-one plugin for improvement on Meta Quest and Oculus Rift headsets, supported by Meta. (This tutorial depends on the OpenXR plugin, as that is the extra generalized system.)

Unreal Engine 5 supplies a Digital Actuality pattern mission template which options instruments like a VRPawn Blueprint, implementing avatars for movement controllers, participant motion, and stereo rendering that follows the orientation of the participant’s view.

It’s time to dive into the dungeon within the Meta Quest! Inside this tutorial, you’ll discover the fundamentals of the VRPawn Blueprint, and lengthen the design for custom-made interactions. Additionally, you will see how one can make interactive components — together with grabbable objects, doorways, and switches.

puma_dungeon

Digital Actuality Template

Unreal Engine 4 and 5 each embody quite a lot of usable template tasks that will help you get a leg up on improvement for a selected sport type.

vr template

The Blueprint Digital Actuality Template supplies property for creating video games with teleport locomotion, snap turning, and grabbable objects. The beginning pattern mission builds upon this template mission to provide an instance for the way to adapt content material to start out a VR sport.

Obtain the starter mission to start this tutorial — you’ll find a hyperlink on the high or backside of this web page!

VR Participant Character

It’s time to evaluate Sport Mode setup. The Sport Mode lets you choose the VRPawn Blueprint for the preliminary state of the sport, and supplies the fundamentals for a VR expertise.

Open the starter mission in Unreal Engine 5. Then, discover the World Settings tab within the decrease proper of your editor view. Use the WindowWorld Settings menu possibility if it’s not already open.

world settings

In Unreal Engine, a Sport Mode might be assigned to a degree, defining the essential guidelines of gameplay. The Sport Mode may also set the Default Pawn Class, and the preliminary setup for a degree — it units the VRPawn Blueprint Class to signify the participant for the interfaces with the Meta Quest headset and movement controllers.

Subsequent, open the Content material Drawer on the backside of the Unreal Engine editor, and discover the VRPawn Blueprint Class through the use of the ‘Search All’ discipline. After you discover the VRPawn, double-click to open this within the editor.

vrpawn

The VRPawn Blueprint will open within the Blueprint Editor.

To know this Blueprint, it’s greatest to interrupt it down into separate elements:

First, discover that the Parts tree incorporates each a Digital camera that tracks the head-mounted gadget (HMD), in addition to the MotionControllerLeftGrip and MotionControllerRightGrip that present visible representations of the VR controllers. Beneath these, respectively, are the HandLeft and HandRight skeletal meshes that reply to modifications within the controller positions and grip actions.

vrpawn_components

Subsequent, the Occasion Graph and Features present the logic for a way inputs from controller presses can seize objects, or result in motion actions — together with teleportation and snap flip actions. Teleportation is a standard motion scheme supported in lots of VR video games to mitigate detrimental results of movement in VR that may result in nausea.

vrpawn_eventgraph_teleport

Within the VRPawn Blueprint, a button press initiates a hint from the present World Location and the Ahead Vector of the precise controller, and attracts a trajectory path to the potential new participant location.

On the button launch, the Attempt Teleport block will take a look at if it’s a sound vacation spot, and transfer the participant in that case.

First Steps: Teleportation

So, what’s a sound vacation spot? It’s any floor on the world map that falls inside a NavMeshBoundsVolume, outlined as a navigable floor.

The PlayerStart location is positioned on the entrance of the dungeon. It’s best to start by including a navigable floor beginning there. You’ll have to discover a C++ Class from the Engine. To make these seen within the Content material Browser, discover the settings within the right-hand nook of the browser. Be sure that each Present C++ Courses and Present Engine Content material are enabled.

content_settings

Seek for the NavMeshBoundsVolume C++ Class from the Content material Drawer, and drag a replica of this class into the world view so as to add to the extent.

Choose the NavMeshBoundsVolume and look beneath the Particulars tab beneath Rework to alter its location as X:955, Y:230, Z:-110, with a Rotation of Z:-45 and a Scale set as X:5.0, Y:10.0, and Z:0.4. This orientation and scale extends the slab of the NavMeshBoundsVolume to fully cowl the grass floor of the beginning location.

navmesh

Now, within the outliner, copy and paste this NavMeshBoundsVolume to create one other copy. Likewise, replace the Rework to alter its location as X:750, Y:425, Z:-100, with a Rotation of Z:-45 and a Scale set as X:3.0, Y:3.0, and Z:1.0 to cowl the staircase.

Create yet another copy and paste so as to add a 3rd NavMeshBoundsVolume, then replace its Rework to alter its location as X:480, Y:2000, Z:4.5, with a Rotation of Z:0 and a Scale set as X:10, Y:20.0, and Z:0.8 to cowl the remaining flooring of the rooms above.

Choose the three NavMeshBoundsVolumes and zoom out from the map to see a view exhibiting that the flooring and stairs are actually contained throughout the general volumes, and are actually traversable.

navmeshboundsvolumes_ingame

It’s time to provide VR a take a look at from throughout the editor! Join your Meta Quest by a tether to your PC, and just be sure you’ve enabled the tethered connections.

At this level, you’ll have the ability to teleport throughout all of the rooms of the dungeon. The Teleportation motion is initiated by shifting the thumbstick ahead on the precise movement controller.

Allow the VR Preview mode by selecting the menu possibility within the toolbar.

Enable_vrpreview

Click on the inexperienced arrow button to Play this degree in VR and teleport by means of the dungeon!

teleport_movie

Be aware: VR Preview will not be out there on MacOS. Nevertheless, you’ll be able to nonetheless construct shortly to a Meta Quest by selecting Platforms and both deciding on Fast Launch in case your gadget is exhibiting on the checklist, or packaging the mission for Android after which putting in to your gadget with ADB or SideQuest. Skip to the tip of the tutorial for directions on the way to get arrange for constructing to your Meta Quest gadget.

author avatar
roosho Senior Engineer (Technical Services)
I am Rakib Raihan RooSho, Jack of all IT Trades. You got it right. Good for nothing. I try a lot of things and fail more than that. That's how I learn. Whenever I succeed, I note that in my cookbook. Eventually, that became my blog. 
rooshohttps://www.roosho.com
I am Rakib Raihan RooSho, Jack of all IT Trades. You got it right. Good for nothing. I try a lot of things and fail more than that. That's how I learn. Whenever I succeed, I note that in my cookbook. Eventually, that became my blog. 

Related Articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here


Latest Articles

author avatar
roosho Senior Engineer (Technical Services)
I am Rakib Raihan RooSho, Jack of all IT Trades. You got it right. Good for nothing. I try a lot of things and fail more than that. That's how I learn. Whenever I succeed, I note that in my cookbook. Eventually, that became my blog.