Sie sind nicht angemeldet.

1

Dienstag, 17. Oktober 2017, 12:24

Need help to set two different Vr_cursor Timeout

I need to have on some of some hotspots a very quick timeout for the autp_click action of the vr_cursor.

I've created a new action on webvr.xlm, and added after the standard one:

Zitat

<!-- vr_auto_click_veloce() - call this action in the onover event of a
hotspot to trigger automatically a click after some time. -->
<action name="vr_auto_click_veloce">
if(webvr.isenabled,
if(%1 != null, set(vr_aclk_timeout, %1), set(vr_aclk_timeout, 20));
copy(vr_aclk_t1, timertick);
set(vr_aclk_waiting, true);
copy(vr_aclk_hotspot, name);
set(hotspot[vr_cursor].crop,'0|0|80|80');

asyncloop(vr_aclk_waiting AND vr_aclk_hotspot == name,
sub(dt, timertick,vr_aclk_t1);

if(!hovering,
set(vr_aclk_waiting, false);
set(hotspot[vr_cursor].crop,'0|0|80|80');
,
div(f, dt, vr_aclk_timeout);
mul(f, 16);
roundval(f);
Math.min(f, 16);
mul(f, 80);

txtadd(hotspot[vr_cursor].crop,get(f),'|0|80|80');

<!-- wait another 100ms delay after finishing the animation before doing the

click -->
sub(dt, 100);
if(dt GT vr_aclk_timeout,
set(vr_aclk_waiting,false);
set(hotspot[vr_cursor].crop,'0|0|80|80');
<!-- call onclick -->
onclick();
);
);
);
);
</action>

And then I've added this line on my tour.xlm

Zitat

<hotspot name="spot1" style="skin_hotspotstyle2" ath="0" atv="0" onover="vr_auto_click_veloce()" linkedscene="scene_p2" />
But my timeout remain the standard one (2000).
Someone could tell me where I've made the mistake?

Beiträge: 623

Wohnort: Sevastopol, Crimea, Russian Federation

Beruf: Interpreting, Building virtual tours

  • Nachricht senden

2

Dienstag, 17. Oktober 2017, 13:42

Hi)

Why not just add a "vr_timeout" setting to the needed hotspots?

Try add

Quellcode

1
vr_timeout="1000"
to some hotspots and see if the vr timeout has changed.
Regards,

Alexey

3

Dienstag, 17. Oktober 2017, 15:08

Yesss.
Thank you Alexey, work !

No need to add any action just:

Zitat

<hotspot name="spot1" style="skin_hotspotstyle2" ath="0.000" atv="0.000" vr_timeout="20" linkedscene="scene_p2" />