Label jitters when scaled with Animation Player (Godot 3.2.2)

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By LemonadeFlashbang

I have an animation applied to UI elements that modulates, scales, and sometimes rotates them slightly as well. This is mainly used for button elements, so you know which button you have selected.

However, the text “jitters” around when hovered over. I think it’s snapping to different positions as it gets resized, but I’m not totally sure. What I do know is it’s a total headache to look at.

this hurts to look at

I’ve tried enabling “Filter”, “Use Mipmaps”, one at a time and both together on the lablel to no effect. I have no pixel snapping in my rendering options either. And, believe it or not, it’s actually worse in game- due to the higher framerate.

Anyone encountered this before and have a solution?

Here’s the animation being played, for reference:
enter image description here

I have no idea why the text is jittering. But what if you turn up the speed? Make it scale up and down faster might get rid of the jittering, or make it less noticeable.

TheJokingJack | 2021-04-12 20:18

It makes it a bit more subtle, but unfortunately it’s definitely still headache inducing.

I tried another temporary solution where I rescale the label element continuously based on the buttons scale, but that didn’t stop the jittering- it just jittered in the same place.

Theoretically I could change the rect_size for the button directly instead of changing scale. The reason I haven’t is because I use this “in focus” animation player for several different types of buttons, and I’d rather fix the core issue at once instead of create object specific workarounds.

LemonadeFlashbang | 2021-04-12 20:58

:bust_in_silhouette: Reply From: LemonadeFlashbang

Looks like it’s the result of an engine bug.

See: Fix flicker in control nodes due to pivot offset by realkotob · Pull Request #46409 · godotengine/godot · GitHub
Or: Control node (TextureRect) scale not smooth with pivot offset · Issue #28804 · godotengine/godot · GitHub

For the time being, going to: Project Settings → GUI → Common and turning off “Snap Controls To Pixels” fixes it.