RestingCoder Posted October 5, 2013 Share Posted October 5, 2013 I am having an issue with the entire world jittering when the camera is moving to follow the player sprite. I have found that this only occurs when I use sprite.body.velocity.x or any other velocity based movement. If I use something like sprite.x -= 4 it does not occur. Have I missed something? If you'd like to see an example, please let me know. I'd prefer this project not be entirely public, as it is personal. Link to comment Share on other sites More sharing options...
rich Posted October 6, 2013 Share Posted October 6, 2013 Yes it was a result of the delta timers in 1.0.6. I've already totally recoded how both the Camera and physics step works in 1.0.7 and will be testing the camera follow tonight, but it should be significantly smoother now. Link to comment Share on other sites More sharing options...
RestingCoder Posted October 6, 2013 Author Share Posted October 6, 2013 Awesome thank you. I figured that was the case after reading one of your replies regarding the camera on another thread but wanted to be sure. Thanks Rich! Link to comment Share on other sites More sharing options...
Yora Posted October 6, 2013 Share Posted October 6, 2013 Ah cool, I had this problem a couple days ago and figured out a roundabout solution after a while by making the controlled sprite be invisible and have the player sprite follow it but with rounded values like so:player.x = playerLoc.x;player.y = playerLoc.y;player.x = Math.floor(player.x);player.y = Math.floor(player.y);Glad it'll be fixed though so I can get rid of that ugliness. Link to comment Share on other sites More sharing options...
RestingCoder Posted October 6, 2013 Author Share Posted October 6, 2013 Haha whatever gets the job done Link to comment Share on other sites More sharing options...
rich Posted October 7, 2013 Share Posted October 7, 2013 Ok I'm pretty sure this is fixed now, but if you want to throw some code at me to test I'll be happy to do so (ideally just using assets/paths from the examples folder). Link to comment Share on other sites More sharing options...
Recommended Posts