Jump to content

Camera Issues - Vertical Climbing Game


Recommended Posts

Dear Phaser Phriends,


I'm trying to figure out how to get a camera to follow the player as he climbs vertically. Also, I want the camera to follow a players descent properly so that when the player returns to his starting y-value, the camera goes back to where it was at game load (in this case, showing the ground completely).


Currently there are 2 problems:


1. The camera only follows the player vertically (or moves up) when the player is moving outside the vertical game boundary. The camera should ideally begin its ascent when the player reaches the fourth block from the ground.


2. When the player descends, the camera remains above the ground level. I'd like the camera to return to its default location when the player is at his starting y-value position.


Example: http://www.lyledenman.com/phaser/camera/

Source: https://github.com/lobsterhands/Phaser_VerticalCamera




* Note: I have read the source code for cameras, but I'm still learning how to read/write code, as I'm sure is clear by my own code.

Link to comment
Share on other sites


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...