WebVR Cursor Rollout

  • Hi,

    Currently I'm using the WebVR cursor to click hotspots which display a textfield layer within the hotspot (parent). Works like a charm. What I'm trying to accomplish now is a method of hiding the textfield layer once the cursor rolls off of the hotspot/textfield. Another words, hide hotspot's text on rollout.

    I've attempted saving and checking (onviewchanged) the opened hotspot's spheretoscreen coords and hiding the hotspot text when the hotspost corrds have apdated to certain distance. But it's unreliable as the coordinates are sometimes NaN and the distance moved isn't as consistant as I expected due to distortion.

    Is there an out-of-the-box solution for this already with WebVR? Or can anyone think of a way to code it?

    Thanks!
    -Joseph

  • Any online example?

    Sorry, nothing yet, it's an iOS App and I have been developing it locally. I actually haven't even tested the hotspots in VR, currently I've been testing it regularly with mouse clicks.

    textfield is not working in VR (not yet)

    What!? Does that mean I will have to use images only for the text overlay layers?? I really should have started testing this in VR...

    Thanks!

  • Wow OK, maybe this is what Umalo was getting at, but I was able to run a test on adding <layer>s to hotspots but when VR mode is enabled it causes all the hotspots to disappear :(

    Looks like I may have to swap image with the hotspot for this to work, if adding layers wont.

  • I know textfields and nested structures doesn't work as VR sports. That's why I wanted to watch working example *smile*

    Ahhh, i see now.

    So I guess I either handle this in pure javascript or simply swap out and resize.

    I successfully tested swapping out the hotspot url for the content and sizing it accordingly. Works.

    Now back to the goal at hand. Onrollout event...

    I tested onmouseout, mouseout, onmouseleave, and mouseleave. Nothing. Then I thought why rule anything out when playing "closed-source" guessing games, and tried "onout". Viola!!!!

    VR Cursor triggers an onout event! SWEET!

    Einmal editiert, zuletzt von BOX (20. März 2017 um 22:42)

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!