jf908 Posted February 13, 2015 Share Posted February 13, 2015 Hey, I'm pretty new to phaser and wanted to start making a platformer game.I'm using Chrome on OS X. I have set up a player sprite using arcade physics and set the camera to follow the player, however the player jitters by 1 pixel when the camera moves with the player. I'm not sure how to go around fixing this problem but I set up a demo here:http://codepen.io/jf908/pen/ZYrLyO?editors=001 This doesn't happen when I set the velocity to 150 so I'm guessing it has something to do with decimals, however I would prefer to be able to adjust the velocity and have the camera stay consistent with the player.Any help would be appreciated, thanks. Link to comment Share on other sites More sharing options...
rich Posted February 14, 2015 Share Posted February 14, 2015 I'd suggest you round the renderer (rather than any game objects). game.renderer.renderSession.roundPixels = true will do it. Just set it once at the start. jf908 1 Link to comment Share on other sites More sharing options...
jf908 Posted February 14, 2015 Author Share Posted February 14, 2015 I'd suggest you round the renderer (rather than any game objects). game.renderer.renderSession.roundPixels = true will do it. Just set it once at the start. Thanks, works great! Link to comment Share on other sites More sharing options...
Recommended Posts