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:
PouleyKetchoupp
2021-11-10 15:57:11 -07:00
parent 3668312e78
commit c3ae7ddedd
22 changed files with 164 additions and 55 deletions

View File

@@ -24,6 +24,9 @@
<member name="from" type="Vector2" setter="set_from" getter="get_from" default="Vector2(0, 0)">
The starting point of the ray being queried for, in global coordinates.
</member>
<member name="hit_from_inside" type="bool" setter="set_hit_from_inside" getter="is_hit_from_inside_enabled" default="false">
If [code]true[/code], the query will detect a hit when starting inside shapes. In this case the collision normal will be [code]Vector2(0, 0)[/code]. Does not affect concave polygon shapes.
</member>
<member name="to" type="Vector2" setter="set_to" getter="get_to" default="Vector2(0, 0)">
The ending point of the ray being queried for, in global coordinates.
</member>