ドキュメント

Unity Engine

Unity Engine

IntersectLineSegments(Vector2, Vector2, Vector2, Vector2)

Finds the intersection between two line segments
読み終わるまでの所要時間 1 分最終更新 1ヶ月前

Definition

public static Vector2 IntersectLineSegments(Vector2 line1Pt1, Vector2 line1Pt2, Vector2 line2Pt1, Vector2 line2Pt2)

Parameters

line1Pt1

The first point of the first line

line1Pt2

The second point of the first line

line2Pt1

The first point of the second line

line2Pt2

The second point of the second line

Returns

Type

Description

Vector2The intersection point, or (float.PositiveInfinity, float.PositiveInfinity) if the lines are parallel