Function getWorldBounds

  • Get the bounds of the world

    Parameters

    • world: World

      The world to calculate the bounds of

    • staticOnly: boolean = false

      Only include static bodies

    • Optional dynamics: DynamicRigidBody[]

    Returns {
        max: Vector2;
        min: Vector2;
    }

    The minimum and maximum coordinates of any body in the world