• 2D
  • AnimationPlayer plays animation differently in editor than in standalone

Hi,

I have a Position2D node that is animated by the AnimationPlayer node. The Position2D node has a Sprite node child. When the animation is played in the editor, it plays "smoothly" as expected. However, when it's played as a standalone application, the animation now "snaps".

Editor: Notice the "mask" sprite is moving to the animated position smoothly as expected.

Standalone App: Notice the "mask" sprite is "snapping" to the position.

What could be causing this issue?

My guess is that this is due to pixel snapping. In the editor you can zoom in and therefore there are more pixels to see (and therefore smoother motion) but in the game, the camera is zoomed out and so this makes it where there is less pixels and so Godot has to try and place the sprite as close to the position as possible. Since the position is between pixels, it snaps back and forth between them as it gets closer/further.

You could try disabling 2D pixel snapping in the project settings and see if that helps. I believe it's in Project Settings / Window but I'm not 100% sure.

Thanks! you were right, when I set the zoom level in the editor to 100%, it also "snaps". Were you reffering to: Rendering > 2d > Snapping > Use Gpu Pixel Snap ? I tried disabling this, with unfortunately no effect. Maybe the only way to fix this issue is for me to re-do the animation for the Position2D at 100% zoom.