summaryrefslogtreecommitdiff
path: root/scene
diff options
context:
space:
mode:
authorGeorg Wacker <contact@georgwacker.com>2019-10-21 16:52:45 +0200
committerGeorg Wacker <contact@georgwacker.com>2019-10-21 16:52:45 +0200
commitdfb7d46a2aaf9bef2c7dd067e699e70291062fb6 (patch)
tree418eb553abc9077bb4ed409afede8f2449819c76 /scene
parent4a726998bd28121dde1d212f363d9eba7efa0caf (diff)
Fix control node transform animation jitter with pivot offset
The workaround for moving the pivot is not needed anymore, in fact it causes all transforms applied to control nodes to jitter while animating (if a pivot offset is set). This can be observed via AnimationPlayer and Tween. The fix is to remove the obsolete workaround that causes this bug. Fixes #28804
Diffstat (limited to 'scene')
-rw-r--r--scene/gui/control.cpp5
1 files changed, 0 insertions, 5 deletions
diff --git a/scene/gui/control.cpp b/scene/gui/control.cpp
index fafbcf0c55..73c9f5749f 100644
--- a/scene/gui/control.cpp
+++ b/scene/gui/control.cpp
@@ -461,11 +461,6 @@ void Control::_update_canvas_item_transform() {
Transform2D xform = _get_internal_transform();
xform[2] += get_position();
- // We use a little workaround to avoid flickering when moving the pivot with _edit_set_pivot()
- if (is_inside_tree() && Math::abs(Math::sin(data.rotation * 4.0f)) < 0.00001f && get_viewport()->is_snap_controls_to_pixels_enabled()) {
- xform[2] = xform[2].round();
- }
-
VisualServer::get_singleton()->canvas_item_set_transform(get_canvas_item(), xform);
}