diff options
Diffstat (limited to 'servers/physics/collision_object_sw.h')
-rw-r--r-- | servers/physics/collision_object_sw.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/servers/physics/collision_object_sw.h b/servers/physics/collision_object_sw.h index e717cc257c..788292ad2a 100644 --- a/servers/physics/collision_object_sw.h +++ b/servers/physics/collision_object_sw.h @@ -59,6 +59,9 @@ private: BroadPhaseSW::ID bpid; AABB aabb_cache; //for rayqueries ShapeSW *shape; + bool trigger; + + Shape() { trigger=false; } }; Vector<Shape> shapes; @@ -94,6 +97,9 @@ protected: virtual void _shapes_changed()=0; void _set_space(SpaceSW *space); + bool ray_pickable; + + CollisionObjectSW(Type p_type); public: @@ -119,6 +125,11 @@ public: _FORCE_INLINE_ Transform get_inv_transform() const { return inv_transform; } _FORCE_INLINE_ SpaceSW* get_space() const { return space; } + _FORCE_INLINE_ void set_ray_pickable(bool p_enable) { ray_pickable=p_enable; } + _FORCE_INLINE_ bool is_ray_pickable() const { return ray_pickable; } + + _FORCE_INLINE_ void set_shape_as_trigger(int p_idx,bool p_enable) { shapes[p_idx].trigger=p_enable; } + _FORCE_INLINE_ bool is_shape_set_as_trigger(int p_idx) const { return shapes[p_idx].trigger; } _FORCE_INLINE_ void set_layer_mask(uint32_t p_mask) { layer_mask=p_mask; } _FORCE_INLINE_ uint32_t get_layer_mask() const { return layer_mask; } |