nosferat Posted January 5, 2014 Share Posted January 5, 2014 Hi! I wanted to put together a basic platformer in Phaser to know the very basics of the framework. So far I really like it but recently I run into a glitch that I think is related to the camera. When the character jumps it seems the camera tries to follow it but it hits the bounds of the world so in the end it only moves1 or 2 pixels on the y axis. Setting the size of the camera to the size of the world won't elminite the problem, neither setting the camera offset for the player. I'm clueless now. This is what I'm talking about: https://dl.dropboxusercontent.com/u/45620018/frozen-secret-kitten/index.html Its just a simple project so you will find the code of it in the html source. Link to comment Share on other sites More sharing options...
evan312 Posted January 5, 2014 Share Posted January 5, 2014 hmm, yes there is a slight jump. You could try:game.camera.follow(player, Phaser.Camera.FOLLOW_PLATFORMER);instead of: game.camera.follow(player); on line 67. P.S. I like your art! Link to comment Share on other sites More sharing options...
nosferat Posted January 6, 2014 Author Share Posted January 6, 2014 This did not help unfortunately, however after some experimentation the with the field Camera.deadzone I managed to solve this problem. Thank you anyways. I would be glad if I could draw like this, but sadly its a free art I've found: http://kenney.nl/assets Link to comment Share on other sites More sharing options...
Recommended Posts