Quick answer: Godot Tween’s TRANS_BOUNCE clipping the visible result past the end value? The interpolation overshoots by design — clamp the visible value in your setter or pick a different trans type.
A UI panel slides in with TRANS_BOUNCE and briefly pokes past its target X, then snaps back. The overshoot is the intended behavior of bounce.
Bounce Is Allowed to Overshoot
TRANS_BOUNCE and TRANS_ELASTIC produce values above 1.0 or below 0.0 during the easing curve. That’s why they read as “bouncy”. If a clipping mask or constraint can’t handle it, you see a flicker or pop.
Clamp at the Setter
tween.tween_method(func(v): panel.position.x = clamp(v, 0, target), start, target, 0.5).set_trans(Tween.TRANS_BOUNCE)The interpolation produces overshoot; you clamp before applying. Soft visual without the artifact.
Pick a Softer Curve
TRANS_BACK overshoots once gently. TRANS_QUAD with EASE_OUT settles cleanly. Reach for BOUNCE only when you want a visible bounce, not just “snappy”.
Verifying
Animation reads bouncy in motion but the panel’s final rect doesn’t exceed the layout bounds at any frame.
“Bounce overshoots by design. Clamp it or pick TRANS_QUAD for snap without spill.”
Animation designers love BOUNCE; layout engineers hate it. Reserve it for floating tooltips, not for things that must hug a layout edge.