diff options
Diffstat (limited to 'modules/bullet/collision_object_bullet.h')
-rw-r--r-- | modules/bullet/collision_object_bullet.h | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/modules/bullet/collision_object_bullet.h b/modules/bullet/collision_object_bullet.h index c9430bec18..04231b0814 100644 --- a/modules/bullet/collision_object_bullet.h +++ b/modules/bullet/collision_object_bullet.h @@ -167,14 +167,18 @@ public: _FORCE_INLINE_ const VSet<RID> &get_exceptions() const { return exceptions; } _FORCE_INLINE_ void set_collision_layer(uint32_t p_layer) { - collisionLayer = p_layer; - on_collision_filters_change(); + if (collisionLayer != p_layer) { + collisionLayer = p_layer; + on_collision_filters_change(); + } } _FORCE_INLINE_ uint32_t get_collision_layer() const { return collisionLayer; } _FORCE_INLINE_ void set_collision_mask(uint32_t p_mask) { - collisionMask = p_mask; - on_collision_filters_change(); + if (collisionMask != p_mask) { + collisionMask = p_mask; + on_collision_filters_change(); + } } _FORCE_INLINE_ uint32_t get_collision_mask() const { return collisionMask; } |