summaryrefslogtreecommitdiffstats
path: root/scene/3d/collision_object.cpp
diff options
context:
space:
mode:
authorFabio Alessandrelli <fabio.alessandrelli@gmail.com>2015-11-30 21:04:24 +0100
committerFabio Alessandrelli <fabio.alessandrelli@gmail.com>2015-12-02 11:30:48 +0100
commit3eba84e1d778cc15459ee44449050d668e85ca79 (patch)
treeb9d6ef2438840de6afb96fee32a02d2897cd5695 /scene/3d/collision_object.cpp
parentf1f3468f70c85c33f630042670b47401eeee6092 (diff)
downloadredot-engine-3eba84e1d778cc15459ee44449050d668e85ca79.tar.gz
Properly update node after clearing shapes in _update_shapes_from_children()
(fix bug causing eg. CircleShape2D.set_radius to generate multiple shapes)
Diffstat (limited to 'scene/3d/collision_object.cpp')
-rw-r--r--scene/3d/collision_object.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/scene/3d/collision_object.cpp b/scene/3d/collision_object.cpp
index 5ecadb48b8..5a89423e5a 100644
--- a/scene/3d/collision_object.cpp
+++ b/scene/3d/collision_object.cpp
@@ -31,14 +31,14 @@
#include "scene/scene_string_names.h"
void CollisionObject::_update_shapes_from_children() {
- shapes.resize(0);
+ shapes.clear();
for(int i=0;i<get_child_count();i++) {
Node* n = get_child(i);
n->call("_add_to_collision_object",this);
}
-// _update_shapes();
+ _update_shapes();
}
void CollisionObject::_notification(int p_what) {