summaryrefslogtreecommitdiffstats
path: root/scene/3d/collision_object.cpp
diff options
context:
space:
mode:
authorShyRed <ShyRed@users.noreply.github.com>2019-03-24 10:38:31 +0100
committerShyRed <ShyRed@users.noreply.github.com>2019-04-23 18:06:48 +0200
commita9d4cde0f5abc399332dde0c7415b99a5796eb34 (patch)
tree1063803662cb51ad51ac81063a8e532fb3d30cc6 /scene/3d/collision_object.cpp
parent6098a7f1914f64c77d689f54d5432095911b744f (diff)
downloadredot-engine-a9d4cde0f5abc399332dde0c7415b99a5796eb34.tar.gz
Allow adding disabled shapes
Adds the ability to directly add disabled shapes to a collision object. Before this commit a shape has always been assumed to be enabled and had to be disabled in an extra step.
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 f542b021be..fc46cf5bdb 100644
--- a/scene/3d/collision_object.cpp
+++ b/scene/3d/collision_object.cpp
@@ -259,9 +259,9 @@ void CollisionObject::shape_owner_add_shape(uint32_t p_owner, const Ref<Shape> &
s.index = total_subshapes;
s.shape = p_shape;
if (area) {
- PhysicsServer::get_singleton()->area_add_shape(rid, p_shape->get_rid(), sd.xform);
+ PhysicsServer::get_singleton()->area_add_shape(rid, p_shape->get_rid(), sd.xform, sd.disabled);
} else {
- PhysicsServer::get_singleton()->body_add_shape(rid, p_shape->get_rid(), sd.xform);
+ PhysicsServer::get_singleton()->body_add_shape(rid, p_shape->get_rid(), sd.xform, sd.disabled);
}
sd.shapes.push_back(s);