Third Person Spectator Camera for Virtual Reality in Unity

Sam Xie
Sam Xie
Published in
2 min readDec 8, 2018
Photo by Cláudio Luiz Castro on Unsplash

Showing the first person view of virtual reality is sometimes hard to convey your message. A spectator camera can be useful when creating video demonstrations of your project, it can avoid those nasty head shakes that the first-person view may create. A third person camera demonstrates a larger field of view and more context of the environment. By displaying your movements as a whole, it feels more personalised and natural to viewers.

Instructions

  1. Create a new camera
  2. Set ‘Target Eye’ to None (Main Display)
  3. Then set the ‘Depth’ to 1 (or whatever is greater than your VR camera’s depth — default 0)

Notes

Make sure that both the VR camera and spectator camera have ‘Target Display’ as ‘Display 1’. Without the VR camera displaying to Display 1, it will not render to the HMD and will crash when built. The spectator camera can be set as display 2, but requires the user to have dual monitors. Instead, setting it as display 1 will render it on your monitor, while still being able see in virtual reality.

This method also does not induce any significant lag in the editor.

If you want to find out more tricks or want to follow the development of our game, please sign up to our newsletter!

--

--

Sam Xie
Sam Xie

Engineer @ Cash App ✨ I write & build stuff on the side 💬 Analyse your Facebook/Whatsapp/Instagram chats at https://doubletext.me | More at https://samxie.net