Method RotationForBox
RotationForBox(Vector3[])
Given a 2D bounding box's vertices, find the rotation of the box.
Declaration
public static Quaternion RotationForBox(Vector3[] vertices)
Parameters
| Type | Name | Description |
|---|---|---|
| Vector3[] | vertices | The 4 vertices of the bounding box, in the order
|
Returns
| Type | Description |
|---|---|
| Quaternion | The rotation of the box, with the horizontal side aligned to the x axis and the vertical side aligned to the z axis |