diff options
author | Bojidar Marinov <bojidar.marinov.bg@gmail.com> | 2016-04-09 21:54:09 +0300 |
---|---|---|
committer | Bojidar Marinov <bojidar.marinov.bg@gmail.com> | 2016-04-09 22:11:12 +0300 |
commit | f7c3d6329cdc9c21c205f1522813090313a422d2 (patch) | |
tree | b4ad305e45bf2d66f5e3a8d35aa36948a2f20c5a /scene/3d/area.h | |
parent | d454e64f429affb89de036eed6daa5c6e5278492 (diff) |
Port collision and layer masks to 3D, fixes #1759
Raycasts now have type_mask and layer_mask. Areas - collision_mask and layer_mask. PhysicsBodies needed only collision_mask.
Diffstat (limited to 'scene/3d/area.h')
-rw-r--r-- | scene/3d/area.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/scene/3d/area.h b/scene/3d/area.h index c250d27fb1..440a7d2030 100644 --- a/scene/3d/area.h +++ b/scene/3d/area.h @@ -54,6 +54,8 @@ private: real_t gravity_distance_scale; real_t angular_damp; real_t linear_damp; + uint32_t collision_mask; + uint32_t layer_mask; int priority; bool monitoring; bool monitorable; @@ -157,6 +159,18 @@ public: void set_monitorable(bool p_enable); bool is_monitorable() const; + void set_collision_mask(uint32_t p_mask); + uint32_t get_collision_mask() const; + + void set_layer_mask(uint32_t p_mask); + uint32_t get_layer_mask() const; + + void set_collision_mask_bit(int p_bit, bool p_value); + bool get_collision_mask_bit(int p_bit) const; + + void set_layer_mask_bit(int p_bit, bool p_value); + bool get_layer_mask_bit(int p_bit) const; + Array get_overlapping_bodies() const; Array get_overlapping_areas() const; //function for script |