mirror of
https://github.com/godotengine/godot.git
synced 2025-12-08 06:09:55 +00:00
Fix incorrect transform calculation in Camera2D when using a custom viewport
This commit is contained in:
parent
ec7d25d355
commit
6aab67da6b
1 changed files with 2 additions and 1 deletions
|
|
@ -738,7 +738,8 @@ Size2 Camera2D::_get_camera_screen_size() const {
|
|||
if (is_part_of_edited_scene()) {
|
||||
return Size2(GLOBAL_GET_CACHED(real_t, "display/window/size/viewport_width"), GLOBAL_GET_CACHED(real_t, "display/window/size/viewport_height"));
|
||||
}
|
||||
return get_viewport_rect().size;
|
||||
ERR_FAIL_NULL_V(viewport, Size2());
|
||||
return viewport->get_visible_rect().size;
|
||||
}
|
||||
|
||||
void Camera2D::set_drag_horizontal_enabled(bool p_enabled) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue