Relative Content

Tag Archive for javascriptgame-developmentphaser-frameworkphaserjs

How to make scrollable game that follows the main character if we use keys or scroll if we use the wheel with Phaser3?

It is my first time using Phaser3 and I am trying to create a game to display in a website. My plan was to make a vertical map that you can navigate either with the keys and scrolling. The thing is that I do not find any examples online, since if the camera follows the character, I do not manage to make the scroll work, and the other way around. Here is a snipet of my code in case it helps

How do I make 2 Immovable Objects Collide and Just Stop [Javascript Phaser]

I have searched online for many hours for an answer, but no one seemed to be doing movement like I was. I just started my Phaser journey, and got stuck pretty early. I want my game to have movement locked onto the player in the center, with everything else moving around it. When I tried to add a building, however, the player would be pushed out from the middle.