Fuze Arena Logo
  • Forum
  • Creations
    Catalogue Showcase
  • Help

setFov()

Purpose

Set the camera field of view in 3D space

Description

Sets the angular extent of the observable 3D space

Syntax

setFov( angle )

Arguments

angle angle of the extent of the observable 3D space

Example

obj1 = placeObject( cube, { -3, 0, 0 }, { 1, 1, 1 } )
obj2 = placeObject( cube, { 3, 0, 0 }, { 1, 1, 1 } )
setObjectMaterial( obj1, white, 0, 0.05 ) // white, smooth, shiny
setObjectMaterial( obj2, white, 0, 0.05 ) // white, smooth, shiny
floor = placeObject( cube, { 0, -2, 0 }, { 10, 0.05, 10 } )
setObjectMaterial( floor, grey, 0, 1 ) // grey, smooth, not shiny
setCamera( { 1, 0.5, 5 }, { 0, 0, 0 } ) // back a bit and off centre, facing world centre
fov = 60
worldLight( {-1, -0.5, -0.5 }, white, 1 )
loop
    c = controls( 0 )
    if c.up then
        fov += 0.5
    endIf
    if c.down then
        fov -= 0.5
    endIf
    fov = clamp( fov, 30, 90 )
    setFov( fov )
    rotateObject( obj1, { 1, 1, 1 }, 1 ) // in all directions by 1 degree
    rotateObject( obj2, { 1, 1, 1 }, -1 ) // in all directions by -1 degree
    drawObjects()
    printAt( 0, 0, "Move left joypad up or down to adjust fov: ", fov )
    update()
repeat

Associated Commands

setCamera()

logo

©2019 FUZE Technologies Ltd. FUZE is a registered trademark of FUZE Technologies Ltd. All rights reserved.

Useful links

  • Fuze Main Site
  • Fuze Arena on Twitter
  • Fuze Arena on Youtube
  • Download Buyer

Contact Information

  • FUZE Technologies Ltd
    15 Clearfields Farm
    Wotton Underwood
    Aylesbury, Buckinghamshire
    ​England, HP18 0RS

  • +44 (0) 1844 239 432

  • contact@fuze.co.uk

© Copyright FUZE Technologies Ltd. All rights reserved.