Browse Source

Fix: CollisionObject shape owner indexing is inconsistent

damarindra 8 years ago
parent
commit
b786e7877b
2 changed files with 2 additions and 2 deletions
  1. 1 1
      scene/2d/collision_object_2d.cpp
  2. 1 1
      scene/3d/collision_object.cpp

+ 1 - 1
scene/2d/collision_object_2d.cpp

@@ -82,7 +82,7 @@ uint32_t CollisionObject2D::create_shape_owner(Object *p_owner) {
 	uint32_t id;
 
 	if (shapes.size() == 0) {
-		id = 1;
+		id = 0;
 	} else {
 		id = shapes.back()->key() + 1;
 	}

+ 1 - 1
scene/3d/collision_object.cpp

@@ -161,7 +161,7 @@ uint32_t CollisionObject::create_shape_owner(Object *p_owner) {
 	uint32_t id;
 
 	if (shapes.size() == 0) {
-		id = 1;
+		id = 0;
 	} else {
 		id = shapes.back()->key() + 1;
 	}