[Solved] Objects 'wobble' as camara slows to stop (platformer with smooth camera)

I have the smooth camera behaviour applied to my platformer character, and the base layer artwork scrolls by smoothly when he walks - great - but any objects placed onto the scene, such as collectables, wobble and don’t quite seem to be locked to the artwork they are placed on. This is especially evident with objects that have straight pixel-sharp vertical sides. It’s like they’re a little out of synch with the main scene background art. Worse, when my player character stops moving, the shapes continue to wobble for a second or two, like they can’t decide what pixel they should occupy, before they finally settle into the right place.

If I remove ‘catch up speed’ from the smooth camera, the issue is minimised, but not eliminated, though the downside is the camera being stiff and unnatural looking. It’s the lerp part of things, I think, where the camera goes from full speed to slowly coming to a stop. Is there no way to have a smoothly accelerating and deaccelerating camera without shimmering/wobbling of graphics? Thanks.

Edit: Also with the built-in camera with lerp there is a shimmer as artwork on top of other artwork wobbles out of synch with what’s underneath.

image

Again, camera following without lerp is a lot better.

Edit more: perhaps I should ask, if I’m right about where the issue is: “is there a way to do lerp that prevents sub-pixel values being generated?”

Edit even more: I seem to have resolved the issue by turning on this checkbox in my game’s properties: Round pixels when rendering.

image

My game doesn’t have pixel art, as such, but it does have many pixel-sharp vertical edges. This setting seems to have resolved the ‘wobble’. I wish it could resolve my wobble, but I will have to go on a diet to fix that.

1 Like