From 3eba84e1d778cc15459ee44449050d668e85ca79 Mon Sep 17 00:00:00 2001 From: Fabio Alessandrelli Date: Mon, 30 Nov 2015 21:04:24 +0100 Subject: Properly update node after clearing shapes in _update_shapes_from_children() (fix bug causing eg. CircleShape2D.set_radius to generate multiple shapes) --- scene/3d/collision_object.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'scene/3d/collision_object.cpp') 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;icall("_add_to_collision_object",this); } -// _update_shapes(); + _update_shapes(); } void CollisionObject::_notification(int p_what) { -- cgit v1.2.3