CollisionObjectBullet::~CollisionObjectBullet() {
	// Remove all overlapping, notify is not required since godot take care of it
	for (int i = areasOverlapped.size() - 1; 0 <= i; --i) {
		areasOverlapped[i]->remove_overlap(this, /*Notify*/ false);
	}

	destroyBulletCollisionObject();
}
Esempio n. 2
0
void SoftBodyBullet::destroy_soft_body() {
	if (space) {
		/// This step is required to assert that the body is not into the world during deletion
		/// This step is required since to change the body shape the body must be re-created.
		/// Here is handled the case when the body is assigned into a world and the body
		/// shape is changed.
		space->remove_soft_body(this);
	}
	destroyBulletCollisionObject();
	bt_soft_body = NULL;
}
Esempio n. 3
0
void SoftBodyBullet::destroy_soft_body() {

	if (!bt_soft_body)
		return;

	if (space) {
		/// Remove from world before deletion
		space->remove_soft_body(this);
	}

	destroyBulletCollisionObject();
	bt_soft_body = NULL;
}