Book Image

Unreal Engine 4 Virtual Reality Projects

By : Kevin Mack, Robert Ruud
Book Image

Unreal Engine 4 Virtual Reality Projects

By: Kevin Mack, Robert Ruud

Overview of this book

Unreal Engine 4 (UE4) is a powerful tool for developing VR games and applications. With its visual scripting language, Blueprint, and built-in support for all major VR headsets, it's a perfect tool for designers, artists, and engineers to realize their visions in VR. This book will guide you step-by-step through a series of projects that teach essential concepts and techniques for VR development in UE4. You will begin by learning how to think about (and design for) VR and then proceed to set up a development environment. A series of practical projects follows, taking you through essential VR concepts. Through these exercises, you'll learn how to set up UE4 projects that run effectively in VR, how to build player locomotion schemes, and how to use hand controllers to interact with the world. You'll then move on to create user interfaces in 3D space, use the editor's VR mode to build environments directly in VR, and profile/optimize worlds you've built. Finally, you'll explore more advanced topics, such as displaying stereo media in VR, networking in Unreal, and using plugins to extend the engine. Throughout, this book focuses on creating a deeper understanding of why the relevant tools and techniques work as they do, so you can use the techniques and concepts learned here as a springboard for further learning and exploration in VR.
Table of Contents (20 chapters)
Title Page
About Packt
Where to Go from Here

Describing your solutions in positive terms

We talked a bit about cargo-cult programming in Chapter 10, Creating a Multiplayer Experience in VR, and made you promise not to do it. To take this idea further, let's look at a phrase we'd like you never to utter: It works—don't touch it! 

This isn't how we describe a robust system. If you feel tempted to say this, congratulations! You're at step one of the make it work; make it right; make it fast process, and that means you're not done. What you've created is a successful example of what your ultimate solution may look like, but now it's time to start the make it right phase. You've met the requirements for this step of your development when you can give three answers about your solution in positive terms:

  • It needs to solve X
  • I know it solves X because....
  • I know it's safe because....


Remember these three statements. Don't skip them. You should be able to describe in clear, simple terms what you're trying to do. (Your rubber duck is a good listener for this too.) You should be able to explain why the thing you just did takes care of the thing you're trying to do, and you should be able to do this in positive terms: We needed to make sure the player can't fire their weapon while the pause menu is up. This takes care of it by having the input handler check for a paused state before it calls the fire function. Finally, you should be able to explain why this thing is safe to do: I know this is safe because we're ensuring that we clear any existing input when the pause state begins, and the input handler knows to allow only the unpause command through.

Discipline yourself to do this, and use clear, positive terms. If you're being vague, you're hiding from a thing you need to solve. Make this a habit: describe what you're trying to do, why you know your solution does it, and why you know it's safe to do it. You'll head off a lot of bugs before they ever even have a chance to make it into your software this way.