MidnaRinku Posted January 6, 2018 Share Posted January 6, 2018 Hello friends, Phaser beginner here! Can anyone figure out why the player sprite in the following example jumps up and down when it collides with the other sprite? This issue happens with all Phaser versions I've tested so far (CE and some earlier versions). https://jsfiddle.net/5435g73f/ Thanks in advance! Link to comment Share on other sites More sharing options...
samme Posted January 6, 2018 Share Posted January 6, 2018 I think this is rounding error in the collision separation. You can often mitigate these by using only velocities in multiples of 60 (implying integer per-frame velocities). For your case rounding body.position in update seems to work: https://jsfiddle.net/5435g73f/2/ Link to comment Share on other sites More sharing options...
MidnaRinku Posted January 6, 2018 Author Share Posted January 6, 2018 Oh I see! Thanks for the help! Link to comment Share on other sites More sharing options...
Recommended Posts