Search Unity

off Screen VR with head Tracking

Discussion in 'AR/VR (XR) Discussion' started by Starsky, Oct 11, 2018.

  1. Starsky

    Starsky

    Joined:
    May 11, 2015
    Posts:
    6
    Dear all,

    I met problem , hoping someone can help me.

    I want to do a stereo rendering on a 3DVision enabled monitor with active 3D Glasses.

    I order to see virtual objects out of screen, native unity camera projection matrix cannot be used. Therefore, I applied my own projection matrix to the left and right eye camera. So that no mater how we change the head, these two cameras will always project on the virtual screen.

    The following pictures show the camera frustums of both left and right eye. When I changed the position , the two camera will always turned towards the virtual screen (white plane)

    20181011_170248.gif

    Everything worked fine in editor play mode, I saw the static while plane in the game view when changing the head position, which showed that the camera frustums covering correctly the whole virtual screen.


    I set the two cameras for left and right stereo target and add the XR settings:
    upload_2018-10-11_16-45-40.png

    After built the demo. I could see the stereo effect on two eyes. I could see that the cube is out of screen. However, when I changed the position of the head(Camera), it seemed that the projection matrix was wrong .
    20181011_170926.gif

    I am not sure if it is the problem of unity or I did something wrong .

    Hope someone can explain,

    I uploaded the code in the attached files.
     

    Attached Files:

    Last edited: Oct 11, 2018