• Hello, everyone.

    For some purposes in my skin design i have to switch fovtype setting from DFOV to MFOV after panorama is loaded and displayed
    I do that using set function:

    Code
    set(view.fovtype, 'MFOV');

    After that i need to recalculate field of view (otherwise one will see viewer bouncing) according to this explanation and it's easy for horisontal window:

    Code
    if(stagewidth GE stageheight,
     	copy(view.fov, view.hfov);
    ,
     	???
    );

    Things get tricky with vertical stages (commonly used in mobiles) cause i don't get what to do with given formula:

    Code
    fovbase=max(windowwidth, windowheight*4/3)

    For example in iPhone simulator while i use VFOV setting i have this values:

    Code
    hfov = 60.96
    vfov = 80
    fov = 80

    When i switch to MFOV without recalculation, the viewer assigns another one's and panorama bounces *smile*

    Code
    hfov = 51.66
    vfov = 64.36
    fov = 80

    I tried to trace values that i need and got

    Code
    hfov = 66
    vfov = 80
    fov = 96

    As i see hfov variable has got different value then in VFOV mode.
    And i don't get how fov=96 appeared.

    Is it possible to recalculate fov precisely? What shoul i put instead question marks?

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!