Skip to main content
Inspiring
July 12, 2016

Pop up menus examples

Hiya
 
I need to quickly implement some pop up menus in my app. Is there any good examples available that can be easily modified.
Happy to pay if they are unity store purchases.

What are people using now days.

Cheers

-P
    This topic has been closed for replies.

    14 replies

    pjennessAuthor
    Inspiring
    August 7, 2016
    Turns out , after all this is it was much simpler to skip all the VR sample stuff, and just do a ray cast to a collider on the button.
    If you setup the button as normal UI with function you can use m_myButton.functionName.Invoke() to trigger it from code.

    Thanks all for your patience...I finally have a dynamic and working menu :)


    -P
    Drift VFX Visual, Virtual , Vertical Want 970GTX on Macbook for good FPS? https://forums.oculus.com/viewtopic.php?f=26&t=17349
    Inspiring
    August 8, 2016
    Great! :) As you realized, you don't use the built-in Unity UI event system at all to handle clicks/overs/exits/etc. Instead, VRInput becomes your own custom event manager. You just implement the Actions in your VRInteractiveItem. You don't have to register those delegates with the VRInput system because it's handled by VREyeRaycaster. VREyeRaycaster has it's own set of Actions that are registered with VRInput - when VRInput recognizes an Action, it calls the VREyeRaycaster delegate, which in turn calls the function that calls the Action of the current VRInteractiveItem. It's a little confusing - and I'm not sure it needs to be that complex, but it does work.

    VRInput will work fine with OVRInput. OVRInput gives you access to the state of the gamepad/remote/touch buttons and joystick axes. The polling of those devices and translation into Actions is what happens in VRInput.

    And yeah, you need to have a collider on any object you want to be interactive in order for Physics.raycast to work.
    pjennessAuthor
    Inspiring
    August 8, 2016
    I tried using vr input but it seemed complex

    For example in the "fire" portions..where they polled for fire1 up or down. I added || OVRinput.button.one ( r whetever it as)  checking for false or true  (instead of up or down).

    But it was very inconsistant to trigger a "click" or "double click"

    I assume that is how was meant to do

    At the moment I am skippign it as already had an "action" even for my button on the player which also shoots a ray and searches from my buttontype. If it hits a unity UI button it onClick.invokes() so its the same as clicking with a mouse.
    Seems to work....but might come back to VRinput and VRinteractive again later, as there is probably a few nicer things can utilise. (swipes etc)

    -P
    Drift VFX Visual, Virtual , Vertical Want 970GTX on Macbook for good FPS? https://forums.oculus.com/viewtopic.php?f=26&t=17349
    Inspiring
    August 8, 2016
    Ah your double-click thing might be due to timing settings, but glad you found something that works for you.

    If you want swipe detection though (for gearvr), you can just grab the DetectSwipe() code from VRInput and put it somewhere else. Unity sample code/classes are functional, but not always set up for easy use in other applications. So cannibalize as needed!