summaryrefslogtreecommitdiff
path: root/scene/3d/ray_cast.h
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2018-08-21 15:30:41 -0300
committerJuan Linietsky <reduzio@gmail.com>2018-08-21 15:31:23 -0300
commitee07fb5ebee339559da46f9d183418bbee2188e5 (patch)
tree4117451bf06046e2916596edc84a4d3f6cbcd592 /scene/3d/ray_cast.h
parent28e9aedbddb41f240ff7b416c8359673d3505a79 (diff)
Changes to ClippedCamera, RayCast,Raycast2D and 2D physics API to add ability to choose between bodies and areas when colliding.
Diffstat (limited to 'scene/3d/ray_cast.h')
-rw-r--r--scene/3d/ray_cast.h18
1 files changed, 9 insertions, 9 deletions
diff --git a/scene/3d/ray_cast.h b/scene/3d/ray_cast.h
index 417cb884cc..e95382e1fe 100644
--- a/scene/3d/ray_cast.h
+++ b/scene/3d/ray_cast.h
@@ -45,9 +45,6 @@ class RayCast : public Spatial {
Vector3 collision_normal;
Vector3 cast_to;
- bool collide_with_bodies;
- bool collide_with_areas;
-
Set<RID> exclude;
uint32_t collision_mask;
@@ -60,24 +57,27 @@ class RayCast : public Spatial {
void _update_debug_shape();
void _clear_debug_shape();
+ 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;
void set_cast_to(const Vector3 &p_point);
Vector3 get_cast_to() const;
- void set_collide_with_bodies(bool p_enable);
- bool get_collide_with_bodies() const;
-
- void set_collide_with_areas(bool p_enable);
- bool get_collide_with_areas() const;
-
void set_collision_mask(uint32_t p_mask);
uint32_t get_collision_mask() const;