Skip to content

Error in camera2d_splitscreen example #2856

@Cleptomania

Description

@Cleptomania

The camera2d_splitscreen example is failing tests due to the following error:

self = <__main__.Game object at 0x7f51e8f43940>

    def setup_players_cameras(self):
        half_width = self.screen_width // 2
    
        # We will make two cameras for each of our players.
        player_one_camera = arcade.camera.Camera2D()
        player_two_camera = arcade.camera.Camera2D()
    
        # We can adjust each camera's viewport to create our split screens
        player_one_camera.viewport = arcade.LBWH(0, 0, half_width, self.screen_height)
        player_two_camera.viewport = arcade.LBWH(half_width, 0, half_width, self.screen_height)
    
        # Calling equalise will equalise/equalize the Camera's projection
        # to match the viewport. If we don't call equalise, proportions
        # of our sprites can appear off.
>       player_one_camera.equalise()
E       AttributeError: 'Camera2D' object has no attribute 'equalise'. Did you mean: 'equalize'?

To reproduce run the camera2d_splitscreen.py example

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions