Book Image

Enhancing Virtual Reality Experiences with Unity 2022

By : Steven Antonio Christian
Book Image

Enhancing Virtual Reality Experiences with Unity 2022

By: Steven Antonio Christian

Overview of this book

Virtual reality (VR) has emerged as one of the most transformative mediums of the 21st century, finding applications in various industries, including gaming, entertainment, and education. Enhancing Virtual Reality Experiences with Unity 2022 takes you into the fascinating realm of VR, where creativity meets cutting-edge technology to bring tangible real-world applications to life. This immersive exploration not only equips you with the essential skills needed to craft captivating VR environments using Unity's powerful game engine but also offers a deeper understanding of the philosophy behind creating truly immersive experiences. Throughout the book, you’ll work with practical VR scene creation, interactive design, spatial audio, and C# programming and prepare to apply these skills to real-world projects spanning art galleries, interactive playgrounds, and beyond. To ensure your VR creations reach their full potential, the book also includes valuable tips on optimization, guaranteeing maximum immersion and impact for your VR adventures. By the end of this book, you’ll have a solid understanding of VR’s versatility and how you can leverage the Unity game engine to create groundbreaking projects.
Table of Contents (25 chapters)
1
Part 1: Philosophy and Basics of Understanding Virtual Reality
3
Part 2: Technical Skills for Building VR Experiences in Unity (Assets, GameObjects, Scripts, and Components)
12
Part 3: Projects: Putting Skills Together
21
Part 4: Final Touches

Adding light switches

We can provide a workaround to have high-quality lights and great performance while also limiting the number of lights that are turned on within a certain proximity. We can do that by creating a system where we press a light switch, and in doing so, turn off the lights that are within a specified distance of that light switch. Therefore, we’re able to simulate a somewhat realistic experience of only having lights on that are turned on by us and turning off the lights that are not.

To create a light switch to place on the walls, go through the following steps:

  1. Create an empty GO as a child of ArtGallery.
  2. Name it LightSwitches.
  3. Create another empty GO in LightSwitches.
  4. Name it LightSwitch.
  5. Create a cube as a child of the LightSwitch GO.
  6. Name it SwitchBody.
  7. Set the Y position to .05. Set the X scale to .5. Set the Y scale to .1. Set the Z scale to .5.
  8. Give the cube a DarkGray_Standard material.
  9. Create a cylinder and...