diff options
| author | Juan Linietsky <reduzio@gmail.com> | 2018-08-21 15:30:41 -0300 |
|---|---|---|
| committer | Juan Linietsky <reduzio@gmail.com> | 2018-08-21 15:31:23 -0300 |
| commit | ee07fb5ebee339559da46f9d183418bbee2188e5 (patch) | |
| tree | 4117451bf06046e2916596edc84a4d3f6cbcd592 /scene/2d/ray_cast_2d.h | |
| parent | 28e9aedbddb41f240ff7b416c8359673d3505a79 (diff) | |
| download | redot-engine-ee07fb5ebee339559da46f9d183418bbee2188e5.tar.gz | |
Changes to ClippedCamera, RayCast,Raycast2D and 2D physics API to add ability to choose between bodies and areas when colliding.
Diffstat (limited to 'scene/2d/ray_cast_2d.h')
| -rw-r--r-- | scene/2d/ray_cast_2d.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/scene/2d/ray_cast_2d.h b/scene/2d/ray_cast_2d.h index 0850cdc7cc..a438be87b6 100644 --- a/scene/2d/ray_cast_2d.h +++ b/scene/2d/ray_cast_2d.h @@ -49,12 +49,21 @@ class RayCast2D : public Node2D { Vector2 cast_to; + bool collide_with_areas; + bool collide_with_bodies; + protected: void _notification(int p_what); void _update_raycast_state(); static void _bind_methods(); public: + void set_collide_with_areas(bool p_clip); + bool is_collide_with_areas_enabled() const; + + void set_collide_with_bodies(bool p_clip); + bool is_collide_with_bodies_enabled() const; + void set_enabled(bool p_enabled); bool is_enabled() const; |
