Search Unity

Vive, how to fixe skewed perspective

Discussion in 'VR' started by SmallTimer, Nov 12, 2018.

  1. SmallTimer

    SmallTimer

    Joined:
    Jul 30, 2015
    Posts:
    6
    Pardon if this has already been asked, but I could not seem to find it anywhere:

    Problem:
    Twice now, in the current unity project (2017.4.2f2), I am experiencing that what is seen on the game screen, is not accurate to what I am seeing in the scene view. The vision rendered in Vive is skewed.

    The error persists when I build, but previous builds from before this error is not skewed at all. Any other VR game on the computer runs as expected. Hence I suspect that there are some setting somewhere that I am not aware of, which for some reason causes this.

    More detailed description of error:
    In the headset, and in the game view, I can see my line renderer point at an object, but in the scene view I can see that it is not pointing at the object, but is skewed to the side of it instead. In the headset the scene looks normal. There is nothing to indicate that it is distorted from the actual scene.

    The line renderer is attached to the hand, and I programmed it so that when you grab and hold an object, it will reposition itself to where the raycast, which has the same direction as the line renderer, points on the ground. From that I can also see in the headset and in the game view, that instead of being at the point where the line renderer is pointing at, it is skewed away, and the further I move the line to the right or the left, the more the object will move away from the line renderer's end point. On the scene view it looks as it is supposed to.

    First time solved by?:
    The first time I encountered this problem, I tried to revert back to an earlier stage of the project, and go forth and back between different stages, (taking backups of the scenes, scripts and prefabs before I started to not loose progress). In the end I gave up and, updated to what I had when I tried to start reverting the project, and inserted my backups again where needed. After programming a bit and going back to the game to test the code, it was suddenly not skewed anymore. I have no idea what fixed it the first time.

    What I have tried this time
    I have tried to revert the project and go forth and back multiple times, looked into field of view, player settings, rebooting the headset, running room tutorial, checking on the wires and vr stations, rebooting unity and rebooting the computer.

    Nothing has worked so far, so I am hoping someone out there has an answer to this.

    I am aware of this issue tracker:

    https://issuetracker.unity3d.com/is...-with-steamvr-dashboard-visible-on-openglcore

    But firstly it does not seem to be the problem, and secondly, because of the sound program we are using I am not able to upgrade to a newer version of unity :(
     
  2. TenFiddy

    TenFiddy

    Joined:
    Sep 28, 2017
    Posts:
    21
    OK - from my experience...think simple problems

    1. Is there another camera active in your screen throwing things out of wack with the VR? (Search for cameras in hierarchy)

    2. Transform problem? Has the transform position of the object you are pointing at changed? Try a replace with a simple cube for testing.

    3. Is the game object a clone? Need to make sure your script is identifying the correct object via saving the object as a variable.

    Hope any of these ideas help.
     
  3. SmallTimer

    SmallTimer

    Joined:
    Jul 30, 2015
    Posts:
    6
    Thank you for the answer, and sorry for the late reply, I've been having some internet problems.

    1) no, there is no other camera
    2) there is nothing wrong with the transformations. I could simply see that when having any gameobject (even a simple cube), the raycast would not hit the cube, unless I pointed in a skewed direction. I checked the raycast with a Debug.DrawLine, if I remember correctly.
    3) no. There is no clone, and I debugged with physics.Raycast, where I check whether or not I am hitting anything.

    The problem I had with the skewed vision did, again, fix itself for no obvious reason after a day or two, but I am certain that it will return again. I am beginning to suspect that it has something to do with the Editor itself, but I have no idea where to look, and as long as the problem is not here, I don't know where to start either.

    Best regards