Reader small image

You're reading from  Build Your Own Metaverse with Unity

Product typeBook
Published inSep 2023
PublisherPackt
ISBN-139781837631735
Edition1st Edition
Tools
Concepts
Right arrow
Author (1)
David Cantón Nadales
David Cantón Nadales
author image
David Cantón Nadales

David Cantón Nadales, software engineer from Seville, Spain, with more than 15 years of experience. He is currently a Technical Leader at Grupo Viajes El Corte Inglés, a leading travel company in Europe. He has done a multitude of projects and video games with Unity, VR/AR with Oculus, Hololens, HTC Vive, DayDream and LeapMotion. He was ambassador of the Samsung community "Samsung Dev Spain", and organizer of "Google Developers Group Sevilla". He led more than 100 projects throughout his career. As a social entrepreneur stands out Grita, a social network that emerged during the confinement of COVID-19 that allowed to talk to other people and help each other psychologically. In 2022 he won the Top Developers Awards organized by Samsung.
Read more about David Cantón Nadales

Right arrow

Adding Compatibility for the Meta Quest 2

We have reached the chapter where we will create and implement the last functionality that defines a metaverse, and that’s Virtual Reality.

We will use the Meta Quest 2 virtual reality goggles. The main advantage of these goggles is their standalone mode, which allows autonomous operation without depending on a mobile phone or PC connection.

Of course, this chapter is optional, if you do not want to implement this functionality in your metaverse or simply do not have the goggles to follow the content of these pages, you can continue to the next chapter; its completion will not affect the remaining chapters.

Our mission in this chapter is to understand what the Meta Quest 2 goggles are and how they can help us to offer a fun experience in our project, and to develop a simple implementation that allows the player to choose whether to participate in virtual reality or normal mode.

In the following screenshot, you can see the...

Technical requirements

To carry out the tasks in this chapter, it is necessary to have the Meta Quest 2 virtual reality goggles. This is an optional chapter. Its completion and follow-up will not affect the following chapters. You can skip it if you do not have this type of goggles or you are simply not interested in including this functionality in your project.

Otherwise, this chapter does not have any special technical requirements, but we will start programming scripts in C#, so it would be advisable to have basic knowledge of this programming language. You’ll need an internet connection to browse and download an asset from the Unity Asset Store.

We will continue with the project we created in Chapter 1. Remember that we have the GitHub repository, https://github.com/PacktPublishing/Build-Your-Own-Metaverse-with-Unity/tree/main/UnityProject, which contains the complete project that we will work on here.

You can also find the complete code for this chapter on GitHub...

Understanding what Meta Quest is

The Meta Quest 2 virtual reality goggles are a high-end virtual reality device developed by the Meta company, formerly known as Oculus. The goggles were launched in October 2020 and are the sequel to the popular Meta Quest device.

Figure 13.2 – Official Meta Quest 2 product

Figure 13.2 – Official Meta Quest 2 product

The Meta Quest 2 features an 1832 x 1920 resolution display per eye and a 90 Hz refresh rate, providing a very immersive and fluid virtual reality experience. It also has a Qualcomm Snapdragon XR2 processor, 6 GB of RAM, and internal storage of up to 256 GB.

The Meta Quest 2 VR goggles come with handheld controllers that allow users to interact with virtual objects in a natural way. They also feature motion-tracking technology that allows the user to move around the virtual space without the need for external sensors.

The Meta Quest 2 is a high-quality virtual reality device that offers an immersive and realistic experience for users who...

Getting started with the Meta Quest SDK

In order to implement the headset in our project, we must first carry out preliminary tasks to prepare the environment. The roadmap for this section can be summarized in five phases:

  1. Preparation of the glasses
  2. Developer Mode
  3. Configuring our project
  4. Adding VR compatibility to our project
  5. Testing in the Meta Quest 2

Once you have finished the roadmap, you will be able to run the project in the virtual reality glasses. Are you ready? Let’s start!

Preparation of the glasses

If you already have the Meta Quest 2 and have it configured, skip this part. Here, we will look at the instructions to configure a new pair of glasses. As you will see, setting up a new pair of glasses is really easy. You just need to download the Meta Quest app on your mobile device.

In the Apple App Store, you can find it under the name Meta Quest.

Figure 13.3 – Meta Quest application on Apple’s App Store

Figure 13.3 – Meta Quest application on Apple&...

Summary

In this extensive chapter, we discovered everything we need to implement the impressive Meta Quest 2 virtual reality goggles in our project. We went through, from start to finish, how to set up a new headset and activate the Developer Mode. We also learned how to implement the Oculus SDK in Unity to enjoy a VR Camera and the possibility to interact with the environment through the controllers.

Finally, we have seen how to add a laser to one of our controllers to interact with our Canvas, allowing us to press buttons, write inputs, and interact with our NPCs.

In the next chapter, we will finally learn how to compile our project for Android, iOS, Windows, Mac Desktop, and Linux. We will go through all the necessary steps to correctly generate executable binary files that can be downloaded to other devices and run normally.

lock icon
The rest of the chapter is locked
You have been reading a chapter from
Build Your Own Metaverse with Unity
Published in: Sep 2023Publisher: PacktISBN-13: 9781837631735
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
undefined
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at ₹800/month. Cancel anytime

Author (1)

author image
David Cantón Nadales

David Cantón Nadales, software engineer from Seville, Spain, with more than 15 years of experience. He is currently a Technical Leader at Grupo Viajes El Corte Inglés, a leading travel company in Europe. He has done a multitude of projects and video games with Unity, VR/AR with Oculus, Hololens, HTC Vive, DayDream and LeapMotion. He was ambassador of the Samsung community "Samsung Dev Spain", and organizer of "Google Developers Group Sevilla". He led more than 100 projects throughout his career. As a social entrepreneur stands out Grita, a social network that emerged during the confinement of COVID-19 that allowed to talk to other people and help each other psychologically. In 2022 he won the Top Developers Awards organized by Samsung.
Read more about David Cantón Nadales