summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--scene/2d/collision_object_2d.cpp10
-rw-r--r--scene/2d/collision_object_2d.h1
-rw-r--r--scene/3d/gi_probe.cpp4
3 files changed, 3 insertions, 12 deletions
diff --git a/scene/2d/collision_object_2d.cpp b/scene/2d/collision_object_2d.cpp
index 228b67990c..9f79691405 100644
--- a/scene/2d/collision_object_2d.cpp
+++ b/scene/2d/collision_object_2d.cpp
@@ -46,8 +46,6 @@ void CollisionObject2D::_notification(int p_what) {
else
Physics2DServer::get_singleton()->body_set_state(rid, Physics2DServer::BODY_STATE_TRANSFORM, global_transform);
- last_transform = global_transform;
-
RID space = get_world_2d()->get_space();
if (area) {
Physics2DServer::get_singleton()->area_set_space(rid, space);
@@ -73,19 +71,17 @@ void CollisionObject2D::_notification(int p_what) {
} break;
case NOTIFICATION_TRANSFORM_CHANGED: {
- Transform2D global_transform = get_global_transform();
-
- if (only_update_transform_changes && global_transform == last_transform) {
+ if (only_update_transform_changes) {
return;
}
+ Transform2D global_transform = get_global_transform();
+
if (area)
Physics2DServer::get_singleton()->area_set_transform(rid, global_transform);
else
Physics2DServer::get_singleton()->body_set_state(rid, Physics2DServer::BODY_STATE_TRANSFORM, global_transform);
- last_transform = global_transform;
-
} break;
case NOTIFICATION_EXIT_TREE: {
diff --git a/scene/2d/collision_object_2d.h b/scene/2d/collision_object_2d.h
index 4e7d01c8e6..0a9d33b8a6 100644
--- a/scene/2d/collision_object_2d.h
+++ b/scene/2d/collision_object_2d.h
@@ -67,7 +67,6 @@ class CollisionObject2D : public Node2D {
int total_subshapes;
Map<uint32_t, ShapeData> shapes;
- Transform2D last_transform;
bool only_update_transform_changes; //this is used for sync physics in KinematicBody
protected:
diff --git a/scene/3d/gi_probe.cpp b/scene/3d/gi_probe.cpp
index ccc87b924c..ce7bb25665 100644
--- a/scene/3d/gi_probe.cpp
+++ b/scene/3d/gi_probe.cpp
@@ -386,11 +386,7 @@ void GIProbe::_find_meshes(Node *p_at_node, List<PlotMesh> &plot_meshes) {
}
for (int i = 0; i < p_at_node->get_child_count(); i++) {
-
Node *child = p_at_node->get_child(i);
- if (!child->get_owner())
- continue; //maybe a helper
-
_find_meshes(child, plot_meshes);
}
}