Dev Log #3: VR implementation


Hello, this is my 3rd dev log of the game “Shallow”. We have already worked on this game for about 3 months and we have learned and achieved a lot throughout the process.

About our progress, we have roughly finished 1/3 of the game and all basic mechanics (controls, VR, interact, etc.), yet we have received some feedbacks regarding our controls is being too complicated for some players. Thus, what we decided to do is giving the options to the players: if they like changelings, they can choose to use the realistic control style (which uses joysticks to simulates wheels), or they can choose an easier way to play the game.

Anyways, here are some screenshots showing our progress:

UI in VR

There are a lot of differences between building regular games and VR games, the UI is one of it. In short, UI in VR is in world space other than screen overlay. But what if you want to show something constantly on the screen in VR? Well, the easiest way to do it is to make a world space canvas and attach it to the main camera. Thus, whenever player’s head moves, the UI also following the movement.

Figure 1 the hierarchy view of camera

Figure 2 the pointer

Moreover, it is best for not showing too many UI elements all the time, it is better to insert all UIs within the in-game objects.

One more thing to mention, when trying to do the fade-in/fade-out effect, it is advised to make a black sphere covering the main camera. By changing sphere’s material’s alpha value, the effect will be achieved.

Interaction in VR

Figure 3 the Raycast ray and play area detection

Since the VR headset is always tracking player’s head motion, it is common to use it as an input method. By using it, developers can tell where and which object the player is looking at and perform some sort of interaction with it.

In order to achieve it, combining physics Raycast and event system would be the best solution of it.

Here is the detailed tutorial made by unity:

Moreover, since most of the VR headset has the full body motion detection, to prevent player went out of the play area, it is better to constantly check the main camera position (Since it is bounded to headset position), whether it is in the area.

Motion Sickness

Motion sickness is a huge problem that developer must consider when making VR games. Since no matter how good your game is, if it is making people sick, most people won’t enjoy it.

This issue happened to our game as well, some people saying they have some issue when playtesting our game.

We are still trying to figure a way to prevent this, however there are some factors that will causing it:

  1. When environment is too bright
  2. When there is nothing in front of the player (nothing to focus)
  3. When turning too fast
  4. When speed is too fast
  5. When screen is shaking
  6. When light is flickering (which is an important element of our game, finding a way to get around it)
  7. When weird things happening (example: when player is clipping through the wall)

More info, please check out this link:

Tagged: , ,

Leave a comment

Your email address will not be published. Required fields are marked *