Explorar o código

When Camera2D enters tree, ensure first update is not lost

Marcel Admiraal %!s(int64=3) %!d(string=hai) anos
pai
achega
a124d89f01
Modificáronse 1 ficheiros con 1 adicións e 2 borrados
  1. 1 2
      scene/2d/camera_2d.cpp

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

@@ -254,9 +254,8 @@ void Camera2D::_notification(int p_what) {
 			// if a camera enters the tree that is set to current,
 			// it should take over as the current camera, and mark
 			// all other cameras as non current
-			_set_current(current);
-
 			first = true;
+			_set_current(current);
 
 		} break;
 		case NOTIFICATION_EXIT_TREE: {