diff options
| author | Rémi Verschelde <rverschelde@gmail.com> | 2018-02-13 15:26:04 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-02-13 15:26:04 +0100 |
| commit | eefb58a892dfd5f334cbc86522a1cf0763af77d3 (patch) | |
| tree | 26451b667bdfe48006d98e1502a11738875c63b0 /servers/physics/constraint_sw.h | |
| parent | fd871b4d4f0b4441681a3f0c351058be5834b9dc (diff) | |
| parent | a42765dadad77d4f4893d9ccf73b7cfefc1643bd (diff) | |
Merge pull request #16424 from AndreaCatania/phyj
Added physics API in order to enable/disable collisions between rigidbody attached to a joint with bullet physics bullet
Diffstat (limited to 'servers/physics/constraint_sw.h')
| -rw-r--r-- | servers/physics/constraint_sw.h | 5 |
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; |