Search Unity

Rendering the cursor at the correct distance

Discussion in 'Daydream' started by duncangroberts, Apr 20, 2017.

  1. duncangroberts

    duncangroberts

    Joined:
    Jul 22, 2015
    Posts:
    69
    Hi there,
    I'm having an issue with getting my latest daydream game approved for the store, the rejection being that the cursor doesn't render at the correct distance when pointing over objects. My menu items have colliders on them but the rejection states that the cursor appears static when over near or far objects. Is there any advice I can get to help with this?

    Thanks in advance,

    Duncan
     
  2. duncangroberts

    duncangroberts

    Joined:
    Jul 22, 2015
    Posts:
    69
    Also, just for reference I'm using unity 5.6 and gvr sdk 1.30

    Thanks,

    Duncan
     
  3. duncangroberts

    duncangroberts

    Joined:
    Jul 22, 2015
    Posts:
    69
    Hi there, i thought adding a physics raycaster would solve this issue but I've just been rejected again. Can anyone help with how to render the cursor at the correct length when pointing it at static object in the distance? The rejection note explains that the cursor is being rendered too short. Any help is greatly appreciated.
     
  4. greggtwep16

    greggtwep16

    Joined:
    Aug 17, 2012
    Posts:
    1,546
  5. duncangroberts

    duncangroberts

    Joined:
    Jul 22, 2015
    Posts:
    69
    I will have a look into this, but should this not be possible using the standard SDK? I'd a requirement so it should. Is there anything i could be doing wrong with components or colliders that could be causing the reticle to be rendered too short?
     
    Last edited: Apr 22, 2017
  6. greggtwep16

    greggtwep16

    Joined:
    Aug 17, 2012
    Posts:
    1,546
    Your previous posts mentioned the UI. If you talking about trucks then I assume you are talking about 3d gameobjects not the UI. For 3d objects it's just the raycasts from the camera or controller (depending whether you are doing gaze or controller raycasts) and then hitting the various colliders on the objects you care about.

    Regardless of the type the Google SDK does provide a graphics raycaster which is used in their input module and they also provide a physics raycaster that you can attach to the camera which can handle hitting your objects that have colliders. I tend to roll my own so I can't speak to how well their provided components work but I would assume they work ok. If it didn't I would assume you would find people talking about it on the forums like they were in the thread I linked.

    In either usecase raycasting is a fairly straightforward process. If its hitting things shorter than it should I would first check the collider on the object and make sure it looks right and if not set a breakpoint in the appropriate code and look at the coordinates for what the raycast hit. Between the two it should point you to what is going wrong.
     
  7. duncangroberts

    duncangroberts

    Joined:
    Jul 22, 2015
    Posts:
    69
    Thanks so much for your advice. It's given me a route to take to try and debug this. I'm away now on holiday but I'll let you know how I get on trying to fix this as soon as I'm back.
    Thanks again.
    Duncan
     
  8. duncangroberts

    duncangroberts

    Joined:
    Jul 22, 2015
    Posts:
    69
    Hi there,
    For anyone wondering......having done some digging I believe I can resolve this by setting the max reticle distance to a lot higher on the laser pointer script. Fingers crossed.
    Duncan
     
  9. Captain-Awesome

    Captain-Awesome

    Joined:
    Jul 29, 2014
    Posts:
    28
    I got the exact same rejection, but their suggestion was to make my menu items do something when I hover the cursor over them. (like make them glow, or make them bigger)

    I think I got rejected on Thursday too, so maybe it was just a tester who fixated on this one rule?