Jump to content

First person to fix this Jitter bug will get a donation


WombatTurkey
 Share

Recommended Posts

I got this from the documentation,

follow(target, style, lerpX, lerpY)

Tell the camera which sprite to follow.

You can set the follow type and a linear interpolation value.
Use low lerp values (such as 0.1) to automatically smooth the camera motion.

If you find you're getting a slight "jitter" effect when following a Sprite it's probably to do with sub-pixel rendering of the Sprite position.
This can be disabled by setting game.renderer.renderSession.roundPixels = true to force full pixel rendering.

I can't see the sprites your using, but just know that the jittering happens also with the default box

Link to comment
Share on other sites

4 minutes ago, Babsobar said:

I got this from the documentation,

follow(target, style, lerpX, lerpY)

Tell the camera which sprite to follow.

You can set the follow type and a linear interpolation value.
Use low lerp values (such as 0.1) to automatically smooth the camera motion.

If you find you're getting a slight "jitter" effect when following a Sprite it's probably to do with sub-pixel rendering of the Sprite position.
This can be disabled by setting game.renderer.renderSession.roundPixels = true to force full pixel rendering.

I can't see the sprites your using, but just know that the jittering happens also with the default box

Yep. Even if we enable roundPixels it still happens. But, if we disable roundPixels it doesn't happen but only jitter when camera pans.  Very nasty 

Link to comment
Share on other sites

Ok.

Here: http://jsfiddle.net/Dillybob/vnzzfnmg/1/

Now, hold down S + D and keep your eyes on the tilemap's background you can see the jitter (when camera pans)

Now do: game.camera.roundPx = true;

The sprite jitter's, but not the tilemap / background

However, if you move the sprite by doing `.x+=speed` instead of velocity, there is no problem whatsoever (except for collisions lol)

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...