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
Newby question on Textfield
-
-
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:
Code
Alles anzeigen<hotspot name="infotext" type="text" html="Hello I'm a Textfield Hotspot" flying="1.0" enabled="false" zorder="99" alpha="0.0" distorted="true" oversampling="2" depth="500" scale="0.5" ... other textfield settings for styling ... />
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 -
Many thanks for the helpful notes Klaus, I have realize my first text info in VR mode.
http://demo.visual4d.it/VR_nautica/tour.html
if you have again patience I would timidly ask:
1) there is a way in order to have the Vr cursor behind the text info window?
2) and there is the way to have the same winfow aspect between Desktop view and VR mode view?
Thanks a lot again
Luca -
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...
-
Fantastic, I've resolved.
Inserting these parameters :
...
zorder="999999999999"
...
depth.mobile="500"
depth.normal="100"
scale="0.1" />
Now I've the Vr_cursor under the text window and the same text window dimension between destop version and Oculus WebVR version using depth.mobile and depth.normal parameters.
http://demo.visual4d.it/VR_nautica/tour.html
Thanks again Klaus. -
...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
Jetzt mitmachen!
Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!