summaryrefslogtreecommitdiff
path: root/scene/2d
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2015-04-02 07:22:17 -0300
committerJuan Linietsky <reduzio@gmail.com>2015-04-02 07:22:17 -0300
commit1572238adb5b68e18cf20ec73b2f437736e21152 (patch)
tree4cf50ac1dd8d6253f4991ae5cb0b735841e9c661 /scene/2d
parentebd743f7c215d65c877874cdf58b22437757fbc6 (diff)
merging okam changes
Diffstat (limited to 'scene/2d')
-rw-r--r--scene/2d/physics_body_2d.cpp2
-rw-r--r--scene/2d/visibility_notifier_2d.cpp7
2 files changed, 7 insertions, 2 deletions
diff --git a/scene/2d/physics_body_2d.cpp b/scene/2d/physics_body_2d.cpp
index 22dd0f01d0..5457182ea7 100644
--- a/scene/2d/physics_body_2d.cpp
+++ b/scene/2d/physics_body_2d.cpp
@@ -1198,7 +1198,7 @@ void KinematicBody2D::_bind_methods() {
ObjectTypeDB::bind_method(_MD("move","rel_vec"),&KinematicBody2D::move);
ObjectTypeDB::bind_method(_MD("move_to","position"),&KinematicBody2D::move_to);
- ObjectTypeDB::bind_method(_MD("can_move_to","position"),&KinematicBody2D::can_move_to);
+ ObjectTypeDB::bind_method(_MD("can_move_to","position","discrete"),&KinematicBody2D::can_move_to,DEFVAL(false));
ObjectTypeDB::bind_method(_MD("is_colliding"),&KinematicBody2D::is_colliding);
diff --git a/scene/2d/visibility_notifier_2d.cpp b/scene/2d/visibility_notifier_2d.cpp
index cd3c788b65..abaaf3262a 100644
--- a/scene/2d/visibility_notifier_2d.cpp
+++ b/scene/2d/visibility_notifier_2d.cpp
@@ -65,8 +65,13 @@ void VisibilityNotifier2D::_exit_viewport(Viewport* p_viewport){
void VisibilityNotifier2D::set_rect(const Rect2& p_rect){
rect=p_rect;
- if (is_inside_tree())
+ if (is_inside_tree()) {
get_world_2d()->_update_notifier(this,get_global_transform().xform(rect));
+ if (get_tree()->is_editor_hint()) {
+ update();
+ item_rect_changed();
+ }
+ }
_change_notify("rect");
}