mirror of
https://github.com/Relintai/pandemonium_engine.git
synced 2024-12-22 20:06:49 +01:00
Fix for 2D viewport not updating in the editor when the camera moves
This fixes a problem with 2D viewports not taking the camera position into consideration when previewed in the editor. Fixes #40441
This commit is contained in:
parent
40a9b72afb
commit
689a7340f3
@ -42,8 +42,11 @@ void Camera2D::_update_scroll() {
|
||||
}
|
||||
|
||||
if (Engine::get_singleton()->is_editor_hint()) {
|
||||
update(); //will just be drawn
|
||||
return;
|
||||
update();
|
||||
// Only set viewport transform when not bound to the main viewport.
|
||||
if (get_viewport() == get_tree()->get_edited_scene_root()->get_viewport()) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (!viewport) {
|
||||
|
Loading…
Reference in New Issue
Block a user