Skip to content

Commit

Permalink
Merge pull request #50112 from lawnjelly/camera_2d_current
Browse files Browse the repository at this point in the history
Most recently added current Camera2D takes precedence
  • Loading branch information
akien-mga authored Jul 22, 2021
2 parents 54ad72d + 21a24eb commit e3c5456
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions scene/2d/camera_2d.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -248,9 +248,13 @@ void Camera2D::_notification(int p_what) {
canvas = get_canvas();

_setup_viewport();

_update_process_mode();
_update_scroll();

// 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;

} break;
Expand Down

0 comments on commit e3c5456

Please sign in to comment.