Unity: Creating a VR Canvas Based HUD

Creating a VR Canvas Based HUD in Unity:
This ensures no clipping through world objects by using a second UI camera

1) Create a Canvas object and set the Render Mode to "World Space"
2) Duplicate your VR Camera (under Player->SteamVRObjects->VRCamera)
3) Name this "UICamera" and make it a child of "VRCamera"
4) Unselect "UI" from the VRCamera culling mask
5) Unselect everything but "UI" from the UICamera culling mask
6) Set Clear Flags to "Depth only" and Depth to 1 (higher number than in VRCamera) in UICamera
7) Select "UICamera" as your canvas event camera

Comments

Popular Posts