Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice
  4. Dismiss Notice

VR Laser Pointer that works with Unity UI???

Discussion in 'UGUI & TextMesh Pro' started by CloudyVR, Nov 10, 2018.

  1. CloudyVR

    CloudyVR

    Joined:
    Mar 26, 2017
    Posts:
    709
    All day I have been trying to use SteamVR_LaserPointer and box colliders and all I have figured out is how to click a button. But scrolling and dragging, text selection is ridiculously complicated.

    I need a better way to do this, I was told Unity offered world class VR solutions, yet I can't even figure out how to click a TextField or scroll a ScrollRect with a raycast.

    There are many horribly outdated tutorials all over and I waste so much time learning things that dont work.

    How do I raycast from Vive controller and click, scroll, drag, position cursor?

    Please help me raycast and select some text from a text field, or set cursor position, or just any of the normal UI interactions!
     
    Last edited: Nov 10, 2018
  2. CloudyVR

    CloudyVR

    Joined:
    Mar 26, 2017
    Posts:
    709
    This is very hard to believe that the only thing holding me back is some stupid UI pointer. I have tried so many things and every one has some flaw or mysterious limitation.

    I can't use VRTK anymore because it is obsolete.

    I would pay $$$ now for a simple pointer that works, but even the ones on the asset store are reportedly not working anymore.

    I just developed an entire game only to watch it burn because of Unity's broken ass UI system and VRTK not keeping up with the times.


    So I'm pretty much screwed now.
     
    Last edited: Nov 11, 2018
    laralena likes this.
  3. EMO2oo

    EMO2oo

    Joined:
    Oct 18, 2018
    Posts:
    1
    I was having a similar problem. I ended up using VIVE Input Utility from the asset store. Hope it helps.
     
    Last edited: Nov 13, 2018
  4. yunhan0

    yunhan0

    Joined:
    Aug 18, 2016
    Posts:
    6
    You can try VR UIKit which is on the asset store. I basically used it in every of my VR project to set up the laser pointer that quickly works with Unity UI system. It supports Oculus, VIVE, Gear VR, and Oculus GO.
    (By the way, I'm also the creator of this asset, so I'm happy to answer any of your questions if you have issue using it).
     
  5. CloudyVR

    CloudyVR

    Joined:
    Mar 26, 2017
    Posts:
    709
    Thanks for the suggestion. Quick question, does it properly implement drag and hover events? most pointers I have used in the past are fine for simple click events but are lacking in the more advanced UI interactions..
     
    yunhan0 likes this.
  6. yunhan0

    yunhan0

    Joined:
    Aug 18, 2016
    Posts:
    6
    Yes, it implements drag, hover, scroll events!
     
    CloudyVR likes this.
  7. ChosenZeus

    ChosenZeus

    Joined:
    May 1, 2014
    Posts:
    18
    Hi there!


    Like so many I am going nuts with he rotten RayCasting of unity.


    On one hand (literally the players) I have a pointer for UI working with VRTK, and on the other I have a pointer that can hit objects (not UI)


    Here is what I really need for my project (all from ONE right hand trigger button):


    1. A unified pointer that when it hits a UI button calls the onclick() event (does not call step 2 or 3)

    1. When it is not on UI and hits an object with a certain tag, calls some code (does not call step 1 or 3)

    1. When no UI and no object with tag, calls a different script (that fires a “bullet”) (does not call step 1 or 2)

    Can your asset do this?


    I am going to buy it most likely any way. OMG unity is terrible for this stuff thanks for making this asset at a very reasonable price. (I sent this message as an email to you also.)
     
  8. CloudyVR

    CloudyVR

    Joined:
    Mar 26, 2017
    Posts:
    709
    Proto-G likes this.