Render: setFocalLength

setFocalLength(length)
  • sets the optimal focusing distance in stereo mode.  (3D glasses)

length:

  • Optimal focusing distance in stereo mode.
  • Type:  float number
    Note:
    • By default, stereo mode is turned off. 
       
    • Properties >> Render button >> Stereo >> Stereo
    Sample Code

    ################  set the focal length in Stereo mode

    # import bge module
    import bge

    # get the render module
    rend = bge.render

    # set the focal length
    rend.setFocalLength(4.0)