Click or drag to resize

GeometryGetClosestPointsBetweenSegments2d Method

Given the two 2D segments (p1, q1) and (p2, q2), finds those two points on the two segments that are closest to each other. Returns a Vector2 that contains this point on (p1, q1) as well the accompanying point on (p2, q2).

Namespace:  Godot
Assembly:  GodotSharp (in GodotSharp.dll) Version: 1.0.0
Syntax
C#
public static Vector2[] GetClosestPointsBetweenSegments2d(
	Vector2 p1,
	Vector2 q1,
	Vector2 p2,
	Vector2 q2
)

Parameters

p1
Type: GodotVector2

[Missing <param name="p1"/> documentation for "M:Godot.Geometry.GetClosestPointsBetweenSegments2d(Godot.Vector2,Godot.Vector2,Godot.Vector2,Godot.Vector2)"]

q1
Type: GodotVector2

[Missing <param name="q1"/> documentation for "M:Godot.Geometry.GetClosestPointsBetweenSegments2d(Godot.Vector2,Godot.Vector2,Godot.Vector2,Godot.Vector2)"]

p2
Type: GodotVector2

[Missing <param name="p2"/> documentation for "M:Godot.Geometry.GetClosestPointsBetweenSegments2d(Godot.Vector2,Godot.Vector2,Godot.Vector2,Godot.Vector2)"]

q2
Type: GodotVector2

[Missing <param name="q2"/> documentation for "M:Godot.Geometry.GetClosestPointsBetweenSegments2d(Godot.Vector2,Godot.Vector2,Godot.Vector2,Godot.Vector2)"]

Return Value

Type: Vector2

[Missing <returns> documentation for "M:Godot.Geometry.GetClosestPointsBetweenSegments2d(Godot.Vector2,Godot.Vector2,Godot.Vector2,Godot.Vector2)"]

See Also