Welcome Installation Getting Started User Interaction Build a Game #1 Build a Game #2 Build a Game #3 Colours Coordinates API Reference Globals Window Camera Mouse Key Rect Image Text Shape Line Screen Sound Base

Camera

The camera is a view applied to everything on the screen. Notice how the rectangle moves to the left when the camera moves to the right.


    
__init__(x = 0, y = 0)

Call the camera initialiser. Use this to reset the camera position.

  • x: float

    The camera x position

  • y: float

    The camera y position

x: float

The x position of the camera.

y: float

The y position of the camera.

pos, position: float, float

The position of the camera.

  • x: float

    The camera x position

  • y: float

    The camera y position

scale: float, float

The scale of the camera. Decreasing the scale will zoom in to the screen.

  • x: float

    The camera x scale

  • y: float

    The camera y scale

top: float

The top position of the camera.

left: float

The left position of the camera.

bottom: float

The bottom position of the camera.

The right position of the camera.

Window Mouse