Custom camera when falling down

Recommended Posts


I'm basically making a doodle jump based game, but since I'm really new to Phaser and barely  find any examples on how to handle a custom camera, I'm asking for help on this forum.

I want the camera to follow the player when it goes up, but stop following the player as it goes down. I've looked at a lot of Phaser 2 examples but these confuse me only more. 

This is my code for the camera, right now it basically follows the player up and down. (the clouds are removed below the camera view, so the player keeps falling when it misses a cloud)

cameraMovement() {
    this.cameras.main.setBounds(0, - this.player.yChange, 500, 800);


Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.