ドキュメント

Unity Engine

Unity Engine

IntersectsSegment(Rect, Vector2, Vector2)

Check if a line segment overlaps a rectangle.
読み終わるまでの所要時間 1 分最終更新 1ヶ月前

Definition

public static bool IntersectsSegment(Rect rect, Vector2 p1, Vector2 p2)

Parameters

rect

Rectangle to check.

Line segment point 1.

Line segment point 2.

Returns

Type

Description

boolTrue if line segment overlaps rectangle. False otherwise.