Method Normal
Normal(Vector3, Vector3, Vector3)
Calculates and returns the unit vector normal of 3 points in a triangle.
This is equivalent to: B-A x C-A
.
Declaration
public static Vector3 Normal(Vector3 p0, Vector3 p1, Vector3 p2)
Parameters
Type | Name | Description |
---|---|---|
Vector3 | p0 | First point of the triangle. |
Vector3 | p1 | Second point of the triangle. |
Vector3 | p2 | Third point of the triangle. |
Returns
Type | Description |
---|---|
Vector3 | The unit vector normal of the points |
Normal(ProBuilderMesh, Face)
Finds and returns the best normal for a face.
Declaration
public static Vector3 Normal(ProBuilderMesh mesh, Face face)
Parameters
Type | Name | Description |
---|---|---|
ProBuilderMesh | mesh | The mesh that the target face belongs to. |
Face | face | The face to calculate a normal for. |
Returns
Type | Description |
---|---|
Vector3 | A normal that most closely matches the face orientation in model coordinates. |