|
@@ -59,6 +59,7 @@ void CollisionObject2D::_notification(int p_what) {
|
|
} else {
|
|
} else {
|
|
PhysicsServer2D::get_singleton()->body_set_space(rid, space);
|
|
PhysicsServer2D::get_singleton()->body_set_space(rid, space);
|
|
}
|
|
}
|
|
|
|
+ _space_changed(space);
|
|
}
|
|
}
|
|
|
|
|
|
_update_pickable();
|
|
_update_pickable();
|
|
@@ -102,6 +103,7 @@ void CollisionObject2D::_notification(int p_what) {
|
|
} else {
|
|
} else {
|
|
PhysicsServer2D::get_singleton()->body_set_space(rid, RID());
|
|
PhysicsServer2D::get_singleton()->body_set_space(rid, RID());
|
|
}
|
|
}
|
|
|
|
+ _space_changed(RID());
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@@ -125,6 +127,7 @@ void CollisionObject2D::_notification(int p_what) {
|
|
} else {
|
|
} else {
|
|
PhysicsServer2D::get_singleton()->body_set_space(rid, space);
|
|
PhysicsServer2D::get_singleton()->body_set_space(rid, space);
|
|
}
|
|
}
|
|
|
|
+ _space_changed(space);
|
|
} break;
|
|
} break;
|
|
|
|
|
|
case NOTIFICATION_DISABLED: {
|
|
case NOTIFICATION_DISABLED: {
|
|
@@ -246,6 +249,7 @@ void CollisionObject2D::_apply_disabled() {
|
|
} else {
|
|
} else {
|
|
PhysicsServer2D::get_singleton()->body_set_space(rid, RID());
|
|
PhysicsServer2D::get_singleton()->body_set_space(rid, RID());
|
|
}
|
|
}
|
|
|
|
+ _space_changed(RID());
|
|
}
|
|
}
|
|
}
|
|
}
|
|
} break;
|
|
} break;
|
|
@@ -272,6 +276,7 @@ void CollisionObject2D::_apply_enabled() {
|
|
} else {
|
|
} else {
|
|
PhysicsServer2D::get_singleton()->body_set_space(rid, space);
|
|
PhysicsServer2D::get_singleton()->body_set_space(rid, space);
|
|
}
|
|
}
|
|
|
|
+ _space_changed(space);
|
|
}
|
|
}
|
|
} break;
|
|
} break;
|
|
|
|
|
|
@@ -569,6 +574,9 @@ void CollisionObject2D::set_body_mode(PhysicsServer2D::BodyMode p_mode) {
|
|
PhysicsServer2D::get_singleton()->body_set_mode(rid, p_mode);
|
|
PhysicsServer2D::get_singleton()->body_set_mode(rid, p_mode);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+void CollisionObject2D::_space_changed(const RID &p_new_space) {
|
|
|
|
+}
|
|
|
|
+
|
|
void CollisionObject2D::_update_pickable() {
|
|
void CollisionObject2D::_update_pickable() {
|
|
if (!is_inside_tree()) {
|
|
if (!is_inside_tree()) {
|
|
return;
|
|
return;
|