diff options
Diffstat (limited to 'scene/2d')
-rw-r--r-- | scene/2d/navigation_polygon.cpp | 2 | ||||
-rw-r--r-- | scene/2d/parallax_background.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/scene/2d/navigation_polygon.cpp b/scene/2d/navigation_polygon.cpp index 352ec3b300..35f94bff59 100644 --- a/scene/2d/navigation_polygon.cpp +++ b/scene/2d/navigation_polygon.cpp @@ -329,7 +329,7 @@ void NavigationPolygonInstance::_notification(int p_what) { break; } - c = Object::cast_to<Node2D>(get_parent()); + c = Object::cast_to<Node2D>(c->get_parent()); } } break; diff --git a/scene/2d/parallax_background.cpp b/scene/2d/parallax_background.cpp index 0ddcb7b51b..a13ce6278e 100644 --- a/scene/2d/parallax_background.cpp +++ b/scene/2d/parallax_background.cpp @@ -49,8 +49,8 @@ void ParallaxBackground::_notification(int p_what) { void ParallaxBackground::_camera_moved(const Transform2D &p_transform) { - set_scroll_offset(p_transform.get_origin()); set_scroll_scale(p_transform.get_scale().dot(Vector2(0.5, 0.5))); + set_scroll_offset(p_transform.get_origin() / p_transform.get_scale()); } void ParallaxBackground::set_scroll_scale(float p_scale) { |