Click or drag to resize

GeometryGetClosestPointToSegment2d Method

Returns the 2D point on the 2D segment (s1, s2) that is closest to point. The returned point will always be inside the specified segment.

Namespace:  Godot
Assembly:  GodotSharp (in GodotSharp.dll) Version: 1.0.0
Syntax
C#
public static Vector2 GetClosestPointToSegment2d(
	Vector2 point,
	Vector2 s1,
	Vector2 s2
)

Parameters

point
Type: GodotVector2

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

s1
Type: GodotVector2

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

s2
Type: GodotVector2

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

Return Value

Type: Vector2

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

See Also