Fix error if scene has Camera at saving scene

This commit is contained in:
volzhs 2017-12-25 01:31:28 +09:00
parent d6a88cdc41
commit ff68b80df7
1 changed files with 4 additions and 1 deletions

View File

@ -70,6 +70,9 @@ void Camera::_validate_property(PropertyInfo &p_property) const {
void Camera::_update_camera() {
if (!is_inside_tree())
return;
Transform tr = get_camera_transform();
tr.origin += tr.basis.get_axis(1) * v_offset;
tr.origin += tr.basis.get_axis(0) * h_offset;
@ -81,7 +84,7 @@ void Camera::_update_camera() {
get_viewport()->_camera_transform_changed_notify();
*/
if (!is_inside_tree() || get_tree()->is_node_being_edited(this) || !is_current())
if (get_tree()->is_node_being_edited(this) || !is_current())
return;
get_viewport()->_camera_transform_changed_notify();