Santiago Posted August 20, 2017 Share Posted August 20, 2017 Hello, I got a simple game where a player moves and have a camera following it. Now, when I put a background and I want it to set it static while player moving, produce 2 things I don't want: the camera.follow(player) stop working and in the middle of the world the player stuck like a few seconds as a bug or something, and then continues. //Background ("fondo" is the background, if you don't know) this.fondo = game.add.image(0,0, 'fondoGame'); this.fondo.fixedToCamera = true; this.fondo.cameraOffset.setTo(0,0); this.fondo.scale.set(2); //PLAYER this.player = game.add.sprite(50, 100, 'vikingo'); this.player.anchor.setTo(0.5, 1); game.camera.follow(this.player); game.physics.arcade.enable(this.player); this.player.body.gravity.y = 800; I did a research but couldn't find something that could help me. Link to comment Share on other sites More sharing options...
Santiago Posted August 23, 2017 Author Share Posted August 23, 2017 anyone? Link to comment Share on other sites More sharing options...
samme Posted August 23, 2017 Share Posted August 23, 2017 That looks OK. If you have the background fixedToCamera it's definitely going to look like the player/camera isn't moving until it nears the edges. Use // render() this.game.debug.spriteCoords(this.player, 10, 10); Link to comment Share on other sites More sharing options...
Recommended Posts