To prepare for incoming virtual reality projects, I put together a template with useful movement and interaction controls in Unreal Engine.
Programmed in C++, I included classes for Oculus Rift and Quest motion controllers, teleportation and direct movement with discomfort-reducing blinders, slideshows and video viewers, grabbable objects with info panels, material option choosers and more.
The experience begins with an introduction video, which explains various controls on the Oculus Rift / Quest controller.
The template's VR Character class includes movement by teleportation, showing the target beam when a controller grip is held down. Also available is direct movement with a discomfort-reducing blinder overlay, and snap-rotation, using the analog control sticks.
An extendable class representing grabbale objects includes functionality to hide the controller and replace it with the item, and open / close an information panel with animation.
Some interaction methods concern moving or changing items in the environment, like the Embiggenator, which makes small, grabbable objects into gigantic versions of themselves for closer examination, a rotation control to avoid needing to walk around large items, and a material chooser which changes the finishes on a kitchen when swatches are picked up.
Built-in classes also support showing simple image slideshows, videos with playback controls, and embedded websites with animated information panels.