Lua Tips & Tricks - Episode 2 - VR Camera Tweaks

By - - Stingray
24 mins
Last modification: 16 Sep, 2017

One of the challenges of creating virtual environments is handling player movement through the world. Most games and virtual simulations deal with this using teleportation, limited room scale movements, or simply by having no player movement at all. But what if you need the player's perspective to move through the environment, tethered to another object, such as a rollercoaster cart? How do you maintain the player's ability to look around the environment freely, while also pushing them along a guided path? This is the topic of Lua Tips & Tricks this week.

Simulation Sickness

Generally, when creating VR content, avoiding motion that the player doesn't make themselves is desired. The reason for this is motion or simulation sickness. When the VR perspective moves in an unnatural way that doesn't match the workings of the player's inner ear and the way their brain is interpreting what they see, this is the cause of simulation sickness. If the player's visions sees that they are moving through the environment, but the brain does not get a sense of actual motion from the inner ear, they will generally have an unpleasant experience in VR. However, there are some tricks that can be employed to reduce this. For example, adding a visible container object around the player that is the source of the motion can trick the brain into thinking they are still relatively stationary, while the container object is moving. This is known as the helmet or cockpit effect. A good example would be a moving rollercoaster cart, or an astronaut's helmet. While this technique helps to trick the brain and reduce simulation sickness, keep in mind that any time you move the player virtually but not physically there may still be some residual discomfort. Some other tricks to reducing motion sickness include reducing the field of view when moving faster, reducing the details of objects in the peripheral vision, etc.

The Tutorial

In this week's episode, we'll cover how to use modify the Oculus VR template to attach the VR camera perspective to a moving rollercoaster cart. This tutorial uses makes use of the cockpit effect to reduce some simulation sickness when moving the player around the world virtually. The same outcome could be achieved using Flow, the visual scripting tool in Stingray; however, doing it in Lua, while more complicated, provides greater performance and a smooth, lag free camera motion.

In the next episode, we'll cover how to animate a Stingray camera using the Story tool, then make use of that camera instead. We'll also cover how to use an animated camera imported from 3ds Max.

Until then, enjoy this week's tutorial below:

Posted By
Published In
  • Stingray
  • VR
  • Games
To post a comment please login or register
*Save $66 per month on Autodesk's Suggested Retail Price (SRP) when purchasing 1 year term 3ds Max or Maya subscription.