Fix Camera2D frame delay

Fixes camera frame delay by always doing a scroll update except when smoothing is active.
This commit is contained in:
lawnjelly 2021-03-05 15:46:26 +00:00
parent 8a020a6573
commit 136f94fa24

View file

@ -231,8 +231,9 @@ void Camera2D::_notification(int p_what) {
} break; } break;
case NOTIFICATION_TRANSFORM_CHANGED: { case NOTIFICATION_TRANSFORM_CHANGED: {
if (!is_processing_internal() && !is_physics_processing_internal()) if (!smoothing_enabled || Engine::get_singleton()->is_editor_hint()) {
_update_scroll(); _update_scroll();
}
} break; } break;
case NOTIFICATION_ENTER_TREE: { case NOTIFICATION_ENTER_TREE: {