Poly Proxy: isCollider

isCollider()
  • Returns whether or not the polygon will detect collisions.

Return Type:

  • integer
  • 1 = detects collisions
  • 0 = doesn't detect collision
    Sample Code

    ############################# get whether or not the polygon will detect collisions

    # import bge
    import bge

    # get the current controller
    cont = bge.logic.getCurrentController()

    # get object that owns this controller
    obj = cont.owner
     
    # Get a list of the mesh
    meshList = obj.meshes

    # Get the first mesh on the object
    mesh = meshList[0]
     
    # get the first polygon on the mesh
    poly = mesh.getPolygon(0)

    # get polygon collision detection
    collision_detection = poly.isCollider()