How to make video hotspot visible in web vr mode in pre release 4 / 5

  • Hi,

    Need help,
    I have a video hotspot in xml file as below:
    it work fine in desktop mode, but when i switch to vr mode, no video display.

    the source code is

    <hotspot name="video"
    alpha="0"
    url.flash="plugins/videoplayer.swf"
    url.html5="plugins/videoplayer.js"
    videourl="myhotspot/sled.mp4"
    posterurl="myhotspot/sled.jpg"
    renderer="webgl"
    onloaded="calc_pos_from_hfov_yaw_pitch_roll(41.25, 73.907, -9.75, -24.8); animation();"
    distorted="true"
    scale="1"
    enabled="true"
    capture="false"
    pausedonstart="false"
    loop="true"
    volume="1.0"
    directionalsound="true"
    range="90.0"
    rangefalloff="1.0"
    outofrangevolume="0.0"
    onvideoready=""
    onvideoplay=""
    onvideopaused=""
    onvideocomplete=""
    onerror=""
    animation="tween(alpha, 1, 1, linear, animation());"
    />


    <action name="calc_pos_from_hfov_yaw_pitch_roll">
    calc(deg2rad, Math.PI / 180.0);
    <!-- calc the hotspot size -->
    calc(hfov, 0.5 * (%1) * deg2rad);
    Math.tan(hfov);
    set(width, calc(hfov * 1000));
    set(height, 'prop');
    <!-- calc the ath, atv and rotate settings -->
    calc(yaw, -(%2) * deg2rad);
    calc(pitch, (%3) * deg2rad);
    calc(roll, -(%4) * deg2rad);
    Math.cos(ch, yaw);
    Math.sin(sh, yaw);
    Math.cos(ca, pitch);
    Math.sin(sa, pitch);
    Math.cos(cb, roll);
    Math.sin(sb, roll);
    Math.atan2(yaw, calc(cb*sh - sb*sa*ch), calc(ca*ch));
    Math.atan2(roll, calc(sb*ch - cb*sa*sh), calc(cb*ca));
    Math.asin(pitch, calc(cb*sa*ch + sb*sh));
    calc(ath, yaw / deg2rad);
    calc(atv, pitch / deg2rad);
    calc(rotate, roll / deg2rad);
    </action>

    anyone know what i am missing?
    Many thanks

Participate now!

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