summaryrefslogtreecommitdiff
path: root/servers/physics/constraint_sw.h
diff options
context:
space:
mode:
Diffstat (limited to 'servers/physics/constraint_sw.h')
-rw-r--r--servers/physics/constraint_sw.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/servers/physics/constraint_sw.h b/servers/physics/constraint_sw.h
index a641f06f0c..41789600f6 100644
--- a/servers/physics/constraint_sw.h
+++ b/servers/physics/constraint_sw.h
@@ -41,6 +41,7 @@ class ConstraintSW : public RID_Data {
ConstraintSW *island_next;
ConstraintSW *island_list_next;
int priority;
+ bool disabled_collisions_between_bodies;
RID self;
@@ -50,6 +51,7 @@ protected:
_body_count = p_body_count;
island_step = 0;
priority = 1;
+ disabled_collisions_between_bodies = true;
}
public:
@@ -71,6 +73,9 @@ public:
_FORCE_INLINE_ void set_priority(int p_priority) { priority = p_priority; }
_FORCE_INLINE_ int get_priority() const { return priority; }
+ _FORCE_INLINE_ void disable_collisions_between_bodies(const bool p_disabled) { disabled_collisions_between_bodies = p_disabled; }
+ _FORCE_INLINE_ bool is_disabled_collisions_between_bodies() const { return disabled_collisions_between_bodies; }
+
virtual bool setup(real_t p_step) = 0;
virtual void solve(real_t p_step) = 0;