diff options
author | Bastiaan Olij <mux213@gmail.com> | 2019-04-25 13:03:48 +1000 |
---|---|---|
committer | Bastiaan Olij <mux213@gmail.com> | 2019-05-07 22:43:10 +1000 |
commit | e4dea0595aae76de254502bca714b9e54e46b74a (patch) | |
tree | f8fecbce5e87dd83b0d24c8599a03e9b76b0d1bb /scene/3d | |
parent | 4bb0df7060329390890d74ede7ec848eef552b16 (diff) |
Add transform support to deal with Bullets centering of shapes
Diffstat (limited to 'scene/3d')
-rw-r--r-- | scene/3d/collision_shape.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/scene/3d/collision_shape.cpp b/scene/3d/collision_shape.cpp index f32b1398fd..3190e1e0b2 100644 --- a/scene/3d/collision_shape.cpp +++ b/scene/3d/collision_shape.cpp @@ -65,7 +65,6 @@ void CollisionShape::make_convex_from_brothers() { } void CollisionShape::_update_in_shape_owner(bool p_xform_only) { - parent->shape_owner_set_transform(owner_id, get_transform()); if (p_xform_only) return; @@ -228,6 +227,9 @@ void CollisionShape::_update_debug_shape() { } void CollisionShape::_shape_changed() { + // If this is a heightfield shape our center may have changed + _update_in_shape_owner(true); + if (is_inside_tree() && get_tree()->is_debugging_collisions_hint() && !debug_shape_dirty) { debug_shape_dirty = true; call_deferred("_update_debug_shape"); |