1
0
mirror of https://github.com/godotengine/godot.git synced 2026-01-04 19:21:46 +00:00

Merge pull request #63581 from madmiraal/fix-63330-3.x

This commit is contained in:
Rémi Verschelde
2022-07-28 18:52:53 +02:00
committed by GitHub

View File

@@ -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: {
@@ -437,7 +436,9 @@ void Camera2D::clear_current() {
void Camera2D::set_limit(Margin p_margin, int p_limit) {
ERR_FAIL_INDEX((int)p_margin, 4);
limit[p_margin] = p_limit;
Point2 old_smoothed_camera_pos = smoothed_camera_pos;
_update_scroll();
smoothed_camera_pos = old_smoothed_camera_pos;
}
int Camera2D::get_limit(Margin p_margin) const {