Newby question on Textfield

  • Sorry for my question: I need to realize a window text that appear when the WebVR curson is on an hotspot.
    Could someone give me a simple example in order to make some test, I'm not an expert into program code.
    Thanks to all.
    Luca

  • Hi,

    in WebVR only hotspots are visible, so that textfield need to be defined as hotspot.
    To keep that hotspot always in the center of the view the setting flying="1.0" can be used (btw - if you want a nice paralax effect you can also use there also smaller values e.g. like flying="0.8").
    Then the hotspot should be invisible at the beginning (=> alpha=0.0) and above all other hotspots (=> zorder=99).

    That's basically all - here an example:

    To make it visible when add onover/onout to the 'other' hotspot that should trigger it and
    tween (=animate) there the alpha value to it visible and invisible again:

    Code
    <hotspot ...
             onover="tween(hotspot[infotext].alpha, 1.0);"
             onout="tween(hotspot[infotext].alpha, 0.0);"
             ...
             />

    The WebVR cursor works like the mouse and triggers the same events.

    Best regards,
    Klaus

  • 1) there is a way in order to have the Vr cursor behind the text info window?

    The vr-cursor hotspot will get internally zorder=999999999 to be above all other hotspots. That means to place a hotspot above the vr cursor use an even higher value ;-).

    2) and there is the way to have the same winfow aspect between Desktop view and VR mode view?

    Sorry, not sure what you mean... the hotspot scaling/sizing should be always the same...

  • ...uhm not well resolved instead!

    I use these parameters for my text windows:<hotspot name="p4_parete" type="text" html="data:p4_parete" padding="10" width="250" bgalpha="0.90" bgcolor="0xe5e5e5"
    css="font-family: MiloPro; font-size:14px"
    bgroundedge="5"
    flying="1"
    ox="0"
    enabled="false"
    zorder="999999999999"
    alpha="0"
    distorted="true"
    mipmapping="true"
    oversampling="4"
    depth.mobile="200"
    depth.normal="80"

    scale="0.1" />
    I have to scale down the text in "mobile" version 'cause on Oculus Go the text appear huge at the same scale of "normal" view.

    So I obtain a correct visualization both in desktop view as in Oculus GO or other Web VR visualizations.But when I'm on a mobile devices, before to enter in VR mode, the text windows appear very small, like you can clearly see (on mobile) in that vr tour:http://demo.visual4d.it/VR_terraxcube/…tscene=scene_p5

    Obviously I've missed something.


    There's a way to unify the window dimension in all these 3 scenarios?Thanks a lot for help me.
    Luca

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!