Jonchun Posted June 18, 2015 Share Posted June 18, 2015 When using camera.follow, I (seemingly) randomly get camera jitter when moving around. It's weird because sometimes it is perfectly fine, and other times it starts to jitter like crazy (without touching any code. all i do is refresh the page). Any ideas what could possibly be causing this? I've made sure roundPx is true, and tried it with false as well. Edit: Forgot to mention that I'm moving my character around using velocity and arcade physics. I saw a bunch of stuff about how it's bugged buut they were all really old threads with no solutions. Link to comment Share on other sites More sharing options...
Jonchun Posted June 18, 2015 Author Share Posted June 18, 2015 Okay so it seems like the problem is with phaser's scale manager. turning off scaling stops the issue consistently. edit: i lied. it doesn't seem to be it either. Link to comment Share on other sites More sharing options...
quarks Posted June 19, 2015 Share Posted June 19, 2015 When using camera.follow, I (seemingly) randomly get camera jitter when moving around. It's weird because sometimes it is perfectly fine, and other times it starts to jitter like crazy (without touching any code. all i do is refresh the page). Any ideas what could possibly be causing this? I don't have any major suggestions other than to note that I was having similar issues with this recently, except that the sprite was jittering even without camera follow. I spent nearly a week trying to get a single sprite to move smoothly across the screen, until eventually I just gave up and began to work on the rest of the game. Weirdly enough, once I added controls and got some other sprites in there, the jitter seemed like much less of a problem. I don't know if the jitter is actually objectively less, or if I just am noticing it less because other things are going on. I have no idea if you are in a similar situation, but if you are getting the jitter in a very stripped down test, you may want to try living with it and moving on - it might turn out to affect your game less than you think under "real world" conditions. Link to comment Share on other sites More sharing options...
Jonchun Posted June 19, 2015 Author Share Posted June 19, 2015 I'm getting it on stripped down tests as well. I've been experimenting and I THINK the issue may be a large world size. I tried a stripped down test with different world sizes, (only tested horizontal movement) and every time my world size went over roughly 1500 or so, i started noticing the jitter. It's REALLY bad, and there's no way I can continue if there's no fix for it. I'm going to try out Quintus as well and see if I can get something working. Link to comment Share on other sites More sharing options...
bleeinc Posted December 31, 2015 Share Posted December 31, 2015 Just found the solution to this problem after weeks of hunting for it, just posting it here in case someone else stumbles across this thread like I did.In your render function if it's not already true set game.renderer.renderSession.roundPixels = true;just once and boom everything fixed.Ref: https://github.com/photonstorm/phaser/issues/1377 Link to comment Share on other sites More sharing options...
Recommended Posts