mirror of
https://github.com/godotengine/godot.git
synced 2025-10-19 16:03:29 +00:00
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:
parent
3668312e78
commit
c3ae7ddedd
22 changed files with 164 additions and 55 deletions
|
@ -125,6 +125,9 @@ public:
|
|||
bool collide_with_bodies = true;
|
||||
bool collide_with_areas = false;
|
||||
|
||||
bool hit_from_inside = false;
|
||||
bool hit_back_faces = true;
|
||||
|
||||
bool pick_ray = false;
|
||||
};
|
||||
|
||||
|
@ -805,6 +808,12 @@ 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_hit_back_faces(bool p_enable) { parameters.hit_back_faces = p_enable; }
|
||||
bool is_hit_back_faces_enabled() const { return parameters.hit_back_faces; }
|
||||
|
||||
void set_exclude(const Vector<RID> &p_exclude);
|
||||
Vector<RID> get_exclude() const;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue