소스 검색

Fix Camera2D frame delay

Fixes camera frame delay by always doing a scroll update except when smoothing is active.
lawnjelly 4 년 전
부모
커밋
136f94fa24
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2 1
      scene/2d/camera_2d.cpp

+ 2 - 1
scene/2d/camera_2d.cpp

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