Click or drag to resize

GeometryLineIntersectsLine2d Method

Checks if the two lines (from_a, dir_a) and (from_b, dir_b) intersect. If yes, return the point of intersection as Vector2. If no intersection takes place, returns an empty Variant.

Note: The lines are specified using direction vectors, not end points.

Namespace:  Godot
Assembly:  GodotSharp (in GodotSharp.dll) Version: 1.0.0
Syntax
C#
public static Object LineIntersectsLine2d(
	Vector2 fromA,
	Vector2 dirA,
	Vector2 fromB,
	Vector2 dirB
)

Parameters

fromA
Type: GodotVector2

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

dirA
Type: GodotVector2

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

fromB
Type: GodotVector2

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

dirB
Type: GodotVector2

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

Return Value

Type: Object

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

See Also