GeometrySegmentIntersectsCircle Method |
Given the 2D segment (segment_from, segment_to), 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 circle_position and has radius circle_radius. 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).
Namespace: Godot
public static float SegmentIntersectsCircle( Vector2 segmentFrom, Vector2 segmentTo, Vector2 circlePosition, float circleRadius )
[Missing <param name="segmentFrom"/> documentation for "M:Godot.Geometry.SegmentIntersectsCircle(Godot.Vector2,Godot.Vector2,Godot.Vector2,System.Single)"]
[Missing <param name="segmentTo"/> documentation for "M:Godot.Geometry.SegmentIntersectsCircle(Godot.Vector2,Godot.Vector2,Godot.Vector2,System.Single)"]
[Missing <param name="circlePosition"/> documentation for "M:Godot.Geometry.SegmentIntersectsCircle(Godot.Vector2,Godot.Vector2,Godot.Vector2,System.Single)"]
[Missing <param name="circleRadius"/> documentation for "M:Godot.Geometry.SegmentIntersectsCircle(Godot.Vector2,Godot.Vector2,Godot.Vector2,System.Single)"]
[Missing <returns> documentation for "M:Godot.Geometry.SegmentIntersectsCircle(Godot.Vector2,Godot.Vector2,Godot.Vector2,System.Single)"]