Key for zoom in / zoom out

  • Hello,

    i want to assignate key + for zoom-in progressively in the scene and the key - for zoom-out progressively. I have done some test but not succeed..

    i have done that :

    <events devices="desktop" onkeydown="keydown();" onkeyup="keyup();" />


    <action name="keydown">
    if(keycode == 107, zoomin());

    if(keycode == 109, zoomout());
    </action>

    <action name="zoomin">
    set(fov_moveforce,+1);
    </action>

    <action name="zoomout">
    set(fov_moveforce,-1);
    </action>

    <action name="keyup">
    if(keycode == 107, zoomin2());

    if(keycode == 109, zoomout2());
    </action>

    <action name="zoomin2">
    set(fov_moveforce,0);
    </action>

    <action name="zoomout2">
    set(fov_moveforce,0);
    </action>

    I thought i could use the function i found in the vtourskin for zooming :

    ondown="set(fov_moveforce,-1);" onup="set(fov_moveforce,0);" />

    ondown="set(fov_moveforce,+1);" onup="set(fov_moveforce,0);" />

Participate now!

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