diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2022-08-03 18:34:37 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-03 18:34:37 +0200 |
commit | 259d7781eadad6fb8ac603ef4b68e0cffa373b70 (patch) | |
tree | e123b148e8323d0163d086dd15798be3b24c825f /doc/classes | |
parent | 2d372d9e106286ab281f26f85fdf0f24594469c8 (diff) | |
parent | 500766329f46277d3d9ff9a06c68ca79f635146a (diff) |
Merge pull request #63875 from hakro/fix-segment-intersects-circle
Bring back Geometry2D.segment_intersects_circle
Diffstat (limited to 'doc/classes')
-rw-r--r-- | doc/classes/Geometry2D.xml | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/doc/classes/Geometry2D.xml b/doc/classes/Geometry2D.xml index 195c481187..a4cfa1ddff 100644 --- a/doc/classes/Geometry2D.xml +++ b/doc/classes/Geometry2D.xml @@ -188,6 +188,16 @@ Returns if [code]point[/code] is inside the triangle specified by [code]a[/code], [code]b[/code] and [code]c[/code]. </description> </method> + <method name="segment_intersects_circle"> + <return type="float" /> + <argument index="0" name="segment_from" type="Vector2" /> + <argument index="1" name="segment_to" type="Vector2" /> + <argument index="2" name="circle_position" type="Vector2" /> + <argument index="3" name="circle_radius" type="float" /> + <description> + Given the 2D segment ([code]segment_from[/code], [code]segment_to[/code]), returns the position on the segment (as a number between 0 and 1) at which the segment hits the circle that is located at position [code]circle_position[/code] and has radius [code]circle_radius[/code]. If the segment does not intersect the circle, -1 is returned (this is also the case if the line extending the segment would intersect the circle, but the segment does not). + </description> + </method> <method name="segment_intersects_segment"> <return type="Variant" /> <argument index="0" name="from_a" type="Vector2" /> |