Camera: frustum_culling

frustum_culling
  • gets/sets whether or not the camera is using frustum culling.

Type:
  • boolean
  • 1 = True = camera is using frustum culling
  • 0 = False = camera isn't using frustum culling
Note:
  • Frustum definition:  A camera frustum is a truncated pyramid.  It is the part that is left when the top of the  pyramid is cut off and removed. 
     
  • Frustum culling removes game objects that are outside the viewing frustum from the rendering process.
Sample Code

################## get the status of the frustum culling.
  

# import bge
import bge

# get current scene
scene = bge.logic.getCurrentScene()

# get a list of the cameras
camList = scene.cameras

# get camera
# my camera is named security_cam

cam = camList["security_cam"]

# get frustum culling status
status = cam.frustum_culling

Sample Code

################## set the status of the frustum culling

# import bge
import bge

# get current scene
scene = bge.logic.getCurrentScene()

# get a list of the cameras
camList = scene.cameras

# get camera
# my camera is named security_cam

cam = camList["security_cam"]

# set the frustum culling to True
cam.frustum_culling = True