Method GetFaceRotation
GetFaceRotation(ProBuilderMesh, HandleOrientation, IEnumerable<Face>)
Returns a rotation suitable for orienting a handle or gizmo relative to the Face selection.
Declaration
public static Quaternion GetFaceRotation(ProBuilderMesh mesh, HandleOrientation orientation, IEnumerable<Face> faces)
Parameters
Type | Name | Description |
---|---|---|
ProBuilderMesh | mesh | The target mesh. |
HandleOrientation | orientation | The type of HandleOrientation to calculate. |
IEnumerable<Face> | faces | Which faces to consider in the rotation calculations. This is only used when the HandleOrientation is set to ActiveElement. |
Returns
Type | Description |
---|---|
Quaternion | A rotation appropriate to the orientation and element selection. |
GetFaceRotation(ProBuilderMesh, Face)
Returns the rotation of a Face in world space.
Declaration
public static Quaternion GetFaceRotation(ProBuilderMesh mesh, Face face)
Parameters
Type | Name | Description |
---|---|---|
ProBuilderMesh | mesh | The mesh that the face belongs to. |
Face | face | The face you want to calculate the rotation for. |
Returns
Type | Description |
---|---|
Quaternion | The rotation of the face in world space coordinates. |