mirror of
https://github.com/godotengine/godot
synced 2024-09-05 18:09:34 +00:00
Check if parent is null before updating trasnform
- parent being null means it's not a CollisionObject
This commit is contained in:
parent
8c923fc617
commit
9f29c28918
|
@ -228,7 +228,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 (parent) {
|
||||
_update_in_shape_owner(true);
|
||||
}
|
||||
|
||||
if (is_inside_tree() && get_tree()->is_debugging_collisions_hint() && !debug_shape_dirty) {
|
||||
debug_shape_dirty = true;
|
||||
|
|
Loading…
Reference in a new issue