Search Unity

VrEyeRaycaster seems to change pivot of object

Discussion in 'AR/VR (XR) Discussion' started by joostbos, Feb 20, 2018.

  1. joostbos

    joostbos

    Joined:
    Feb 4, 2015
    Posts:
    64
    I have a strange problem that the pivot point of my camera is not always in the camera. When I hit play in the editor, about 1 in every 5 times the pivot point is changed spontaneously. After some troubleshooting I suspect the VrEyeRaycaster script, because when I disable that script the pivot point is always (well 10 times in 10 tries) correct.

    The camera is the child of an empty gameobject and it is actually the pivot point of that gameobject that is changed. Weirdly enough, the transform position is not changed.

    I have used the setup from theVRSamples in the Interaction in VR tutorial, so my Camera has a child object VrCameraUI which is a Canvas and that has a child object Reticle which is a Raw Image. The changed pivot point is halfway to the reticle, if I set the Reticle default distance = 5, the pivot point is at 2.5 meters in front of the camera and when I set it to 10 the pivot point is 5 meters in front of the camera.

    Any thoughts or suggestions? I saw that there is an update of the VRSamples in the Asset Store, but since this will completely overwrite my project I will not import that version. After importing it to a new project I noticed that there is no change in the VrEyeRaycaster script nor in the Reticle script.

    Thanks!