Utility class. More...
Public Types | |
enum | EasingType { Step, Linear, Sine, Quadratic, Cubic, Quartic, Quintic } |
Static Public Member Functions | |
static string | GetMd5Hash (string input, MD5 md5) |
Gets md5 hash for input string. More... | |
static bool | VerifyMd5Hash (string input, string hash) |
Verify md5 hash. More... | |
static Vector3 | PickPointInCircle (float radius) |
will pick a random 2D point within 2D circle of radius and return the values as [x, 0, z]. More... | |
static Vector3 | PickPointInRectanle (Vector2 wh) |
will pick a random 2D point within 2D rectangle and return the values as [x, 0, z]. More... | |
static float | AngleSigned (Vector3 v1, Vector3 v2, Vector3 n) |
Determine the signed angle between two vectors, with normal 'n' as the rotation axis. More... | |
static Vector3[] | RotatedRectangle (Vector3 p, Vector2 wh, float angle) |
Return vertex points of rectangle rotated around position, on XZ plane More... | |
static Vector3 | PointInRotatedRectangle (Vector2 wh, float angle) |
Return random point in rotated rectangle, on XZ plane More... | |
static float | ClampAngle (float angle, float min, float max) |
static bool | IsInRange (Transform tr, Vector3 pos, float checkDistance, int checkAngle) |
Is pos in range of TR and is TR facing in a direction within checkAngle towards pos? More... | |
static bool | FacingInRange (Transform tr, Vector3 facePos, float range) |
Return True if TR's forward face is within a certain range towards facePos The Dot product is used to determine this so range should be a value between -1 and +1. 1 = 0* 0.866 = 30* 0.7071 = 45* 0.5 = 60* 0 = 90* -0.5 = 120* -0.701 = 135* -0.866 = 150* -1 = 180* For more information on the value that can be used check https://docs.unity3d.com/Documentation/Manual/UnderstandingVectorArithmetic.html More... | |
static bool | FacingInRange (Transform tr, Vector3 facePos, int angle) |
Return True if TR's forward face is within a certain angle towards facePos More... | |
static List< T > | CleanupList< T > (List< T > list) |
Runs through and remove all null values from the list of UnityEngine.Object objects. More... | |
static bool | EnDisableComponent (Component c, bool en) |
Enable/ Disable the component. Component does not actually have an "enabled" property so this function try to cast it to types that might, like Behaviour and Collider. Returns False if it did not manage to set the enabled state. More... | |
static void | GizmoDrawArc (Vector3 center, Vector3 forward, float angle, float radius) |
Draw a wire arc around World.Up. More... | |
Utility class.
|
static |
Determine the signed angle between two vectors, with normal 'n' as the rotation axis.
v1 | Face Direction. |
v2 | Direction to target. |
n | The normal Vector. |
|
static |
Runs through and remove all null values from the list of UnityEngine.Object objects.
T | Generic type parameter. UnityEngine.Object |
list | The list. |
T | : | UnityEngine.Object |
|
static |
Enable/ Disable the component. Component does not actually have an "enabled" property so this function try to cast it to types that might, like Behaviour and Collider. Returns False if it did not manage to set the enabled state.
|
static |
Return True if TR's forward face is within a certain range towards facePos The Dot product is used to determine this so range should be a value between -1 and +1. 1 = 0* 0.866 = 30* 0.7071 = 45* 0.5 = 60* 0 = 90* -0.5 = 120* -0.701 = 135* -0.866 = 150* -1 = 180* For more information on the value that can be used check https://docs.unity3d.com/Documentation/Manual/UnderstandingVectorArithmetic.html
|
static |
Return True if TR's forward face is within a certain angle towards facePos
|
static |
Gets md5 hash for input string.
input | The input string. |
md5 | The fifth md5 object to use. |
|
static |
Draw a wire arc around World.Up.
center | The center point/ position. |
forward | The forward vector of the arc. |
angle | The angle in degrees. |
radius | The radius of the circle. |
|
static |
Is pos in range of TR and is TR facing in a direction within checkAngle towards pos?
|
static |
will pick a random 2D point within 2D circle of radius and return the values as [x, 0, z].
radius | The radius of the circle. |
|
static |
will pick a random 2D point within 2D rectangle and return the values as [x, 0, z].
wh | The width and height of the rectangle. |
|
static |
Return random point in rotated rectangle, on XZ plane
wh | width and height |
angle | angle in degrees |
|
static |
Return vertex points of rectangle rotated around position, on XZ plane
p | position |
wh | width and height |
angle | angle in degrees |
|
static |
Verify md5 hash.
input | The input string. |
hash | The known hash. |