Hi, I have different behaviour is I use a virtual tour on a iphone or a android phone (iphone 6+ and LG G3) and what I understand is it's a timing problem:
in webvr when user rotates his device portrait I copy the "home" button .visible value and then set it to false, and when going back to landscape, if the "home" button was visible initially then I set it to true again :
<action name="webvr_act_as_gyro_in_portrait_mode">
if(device.mobile AND webvr.isenabled,
div(aspect, stagewidth, stageheight);
if(aspect != lastaspect OR '%1' == 'true',
copy(lastaspect, aspect);
if(stagewidth GT stageheight,
<!-- landscape mode -->
set(display.stereo,true);
stoptween(layer[mobiledevice].rotate,layer[mobiledevice].y,layer[webvr_rotate_to_landscape_request].alpha,hotspot[vr_cursor].alpha);
tween(layer[webvr_rotate_to_landscape_request].alpha, 0.0, 1.0);
restoreanimatemobile();
tween(hotspot[vr_cursor].alpha, 1.0, 0.0);
set(webvr.vr_cursor_enabled, true);
if(vrmenuvisible == true, vr_menu_setvisibility(true));
,
<!-- portrait mode -->
set(display.stereo,false);
copy(vrmenuvisible, hotspot[vr_menu_home].visible);
stoptween(layer[webvr_rotate_to_landscape_request].alpha,hotspot[vr_cursor].alpha);
tween(layer[webvr_rotate_to_landscape_request].alpha, 1.0);
animatemobile();
tween(hotspot[vr_cursor].alpha, 0.0, 0.0);
set(webvr.vr_cursor_enabled, false);
vr_menu_setvisibility(false);
);
);
,
set(lastaspect, 0);
);
</action>
Display More
this works perfect on iphone, but on android the home button never comes back to visible, looks like copy(vrmenuvisible, hotspot[vr_menu_home].visible); is done after vr_menu_setvisibility(false);
If I add a delayedcall, like delayedcall(0.5,vr_menu_setvisibility(false)); then it works on both device...
Does that mean iphone is faster to execute actions, and on android the copy action is longer than set visibility one ?
Or maybe my code is wrong somewhere ???
Thanx !