Add raycast options to hit when starting inside / hit back faces
Makes the results consistent for all shape types with options to set the desired behavior.
This commit is contained in:
@ -121,6 +121,8 @@ public:
|
||||
|
||||
bool collide_with_bodies = true;
|
||||
bool collide_with_areas = false;
|
||||
|
||||
bool hit_from_inside = false;
|
||||
};
|
||||
|
||||
struct RayResult {
|
||||
@ -604,6 +606,9 @@ public:
|
||||
void set_collide_with_areas(bool p_enable) { parameters.collide_with_areas = p_enable; }
|
||||
bool is_collide_with_areas_enabled() const { return parameters.collide_with_areas; }
|
||||
|
||||
void set_hit_from_inside(bool p_enable) { parameters.hit_from_inside = p_enable; }
|
||||
bool is_hit_from_inside_enabled() const { return parameters.hit_from_inside; }
|
||||
|
||||
void set_exclude(const Vector<RID> &p_exclude);
|
||||
Vector<RID> get_exclude() const;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user