Search Unity

Google Daydream Controller pointer Begins following head tracking ?

Discussion in 'AR/VR (XR) Discussion' started by jjennings1990, Jun 6, 2017.

  1. jjennings1990

    jjennings1990

    Joined:
    Oct 25, 2012
    Posts:
    132
    Screenshot of Issue :

    controller Pointer bug.png


    Hi everybody I am having an issue with the GVR SDK 1.5 ( and I've seen it in other versions as well) where the Controller pointer reticle gets locked to the VR users head tracking .

    In the past I have usually found this is the source or a graphic raycaster or some other component blocking the reticle but I am not able to see where that might be happening in my current scene project.

    Currently when I launch the app everything is fine , I can point the controller all around the scene and interact with the various UI elements . It seems to happen though that when I leave the main two scenes and asynchronously load into a new scene the reticle which was previously moving freely and in relation to the controllers orientation itself now is locked to the users head tracking . I'll attach a picture to demonstrate what I'm seeing . I set the FollowGaze enum of GVR arm model to never but that didn't seem to help . Is there anything else that I might be missing in my setup ? The last time I fixed this issue I fixed it but I don't recall exactly which step fixed it .

    I read it may be an error where the pointer was referencing something in a previous scene but when changing scenes the reference becomes null and breaks the controller. Any and all insight is appreciated.
     
  2. greggtwep16

    greggtwep16

    Joined:
    Aug 17, 2012
    Posts:
    1,546
    Does it also happen in the editor, when using a mobile phone for the controller? If so it's probably easiest to debug in editor then you'd be able to set a breakpoint to see what is going on.
     
    jjennings1990 likes this.
  3. jjennings1990

    jjennings1990

    Joined:
    Oct 25, 2012
    Posts:
    132
    Thank you I had some trouble configuring the emulator with the unity editor but sorted out . I was able to replicate the same issues in the editor and just as surprisingly as last time after trying and reproducing the issue several times all of a sudden it started working . It really makes no sense and I'd love to know WHY but for now it seems to work . Thank you for your help !
     
  4. jjennings1990

    jjennings1990

    Joined:
    Oct 25, 2012
    Posts:
    132
    Just in case anyone else encounters this issue in the future I did manage to solve and find the reason behind it . It just so happened that some images used in my project were enabled as raycast targets and since they basically are the very first objects I believe the cursor interacts with upon scene loading it was essentially getting " stuck" to these image objects. no matter where I point my laser to . So the laser / raycast I stuck to the image itself ( the image happened to be attached to my main camera which is why it seemed like the laser cursor was following my head tracking )

    II fixed it by just setting the raycast target properties to false in the inspector.
     
  5. expressionpixel

    expressionpixel

    Joined:
    Oct 1, 2012
    Posts:
    20
    I also had this happen to me, I temporarily placed an object with a sphere collider with the same position as the controller/camera, the controller and pointer kept pointing straight up. For future advice, if you don't know why your controller is behaving abnormally, click on the GvrEventSystem gameObject, the GvrPointerInputModule/Event System will report what your object is hitting with the raycast.
     
    jjennings1990 likes this.