Version: 2018.3 (switch to 2019.1)
LanguageEnglish
  • C#
Experimental: this API is experimental and might be changed or removed in the future.

BoundedPlane.GetCorners

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

public void GetCorners(out Vector3 p0, out Vector3 p1, out Vector3 p2, out Vector3 p3);

Parameters

p0The vertex of the first corner.
p1The vertex of the second corner.
p2The vertex of the third corner.
p3The vertex of the fourth corner.

Description

Outputs four points, in device space, representing the four corners of the plane. The corners are in clockwise order.

"Clockwise" winding means the plane's four vertices p0, p1, p2, and p3 rotate clockwise around the plane's center. Viewing the plane from a perspective where the vertices appear in this order would be considered the "front" of the plane. The cross product Vector3.Cross(p1 - p0, p3 - p0) will be in the same direction as BoundedPlane.Normal.

Meshes also use clockwise winding.

Did you find this page useful? Please give it a rating: