Static Public Member Functions | |
static GameObject | AddChild (this Transform tx, string name, params System.Type[] types) |
Resets local position and rotation to identity (zero) More... | |
static void | Zero (this Transform tx) |
Resets local position and rotation to identity (zero) More... | |
static Vector3[] | Positions (this IList< Transform > transforms) |
Returns the .position attributes from a list of transforms. More... | |
static Quaternion[] | Rotations (this IList< Transform > transforms) |
Returns the .rotation attributes from a list of transforms. More... | |
static void | MoveTo (this Transform tx, Vector3 position, float T, Space space) |
Smoothly move to a position over T seconds using world or local position. More... | |
static void | MoveTo (this Transform tx, Vector3 position, float T) |
Smoothly move to a position over T seconds. More... | |
static void | MoveTo (this Transform tx, Vector3 position, float T, System.Action OnFinish) |
Moves to a position of T seconds, then run an action. More... | |
static void | MoveTo (this Transform tx, Vector3 position, float T, Space space, System.Action OnFinish) |
Moves to a position of T seconds, then run an action. More... | |
static void | RotateTo (this Transform tx, Vector3 direction, float T) |
Smoothly rotate to face direction over T seconds. More... | |
static void | RotateTo (this Transform tx, Vector3 direction, float T, System.Action OnFinish) |
Rotates to a direction over T seconds, then run an action. More... | |
static void | RotateTo (this Transform tx, Vector3 direction, float T, Space space) |
Smoothly rotate to face direction over T seconds. More... | |
static void | RotateTo (this Transform tx, Vector3 direction, float T, Space space, System.Action OnFinish) |
Rotates to a direction over T seconds, then run an action. More... | |
static void | PivotTo (this Transform tx, float degrees, float T) |
Pivot on vertical axis to face a direction in degrees. More... | |
static void | LookAt (this Transform tx, Vector3 position, float T) |
Smoothly rotate to look at a position over T seconds. More... | |
static void | LookAt (this Transform tx, Transform target, float T) |
Smooth rotate to look at a target over T seconds. More... | |
static void | PivotTo (this Transform tx, float degrees, float T, System.Action OnFinish) |
Pivots to a direction over T seconds, then run an action. More... | |
static void | LookAt (this Transform tx, Vector3 position, float T, System.Action OnFinish) |
Looks at a direction over T seconds, then run an action. More... | |
static void | LookAt (this Transform tx, Transform target, float T, System.Action OnFinish) |
Looks at a transform over T seconds, then run an action. More... | |
static Rect | ScreenRect (this Transform tx, float width, float height) |
Returns a screen rect that is centred over this transform. More... | |
static Transform | FindClosest (this Transform tx, IList< Transform > list) |
Returns the closest transform from a list of transforms. More... | |
static Transform | FindFurthest (this Transform tx, IList< Transform > list) |
Returnts the furthest transform from a list of transforms. More... | |
static void | MoveAlong (this Transform tx, IList< Vector3 > path, float T) |
Smoothly move along a path over T seconds. More... | |
static void | MoveAlong (this Transform tx, IList< Vector3 > path, float T, Transform lookAt) |
Smoothly move along a path over T seconds, looking at a transform. More... | |
static void | MoveAlong (this Transform tx, IList< Vector3 > path, float T, bool lookAlongPath) |
Smoothly move along a path over T seconds, optionaly looking forward along the path. More... | |
static void | MoveAlong (this Transform tx, IList< Vector3 > path, float T, System.Action OnFinish) |
Smoothly move along a path over T seconds, then run an action. More... | |
static void | MoveAlong (this Transform tx, IList< Vector3 > path, float T, Transform lookAt, System.Action OnFinish) |
Smoothly move along a path over T seconds, then run an action. More... | |
static void | MoveAlong (this Transform tx, IList< Vector3 > path, float T, bool lookAlongPath, System.Action OnFinish) |
Smoothly move along a path over T seconds, then run an action. More... | |
static void | Shake (this Transform tx, float amount, float T) |
Shake by amount units over T seconds. More... | |
static void | Shiver (this Transform tx, float amount, float T) |
Shiver an object by amount degrees over T seconds. More... | |
static void | PlaceOnPath (this Transform tx, IList< Transform > path, float P) |
Places the transform P (0-1) along path. More... | |
static void | PlaceOnPath (this Transform tx, IList< Vector3 > path, float P) |
Place this transform P (0-1) along path. More... | |
static bool | HasLineOfSightTo (this Transform tx, Transform other) |
Determines whether this instance has line of sight to another transform. More... | |
static float | DistanceTo (this Transform tx, Vector3 position) |
Distances to point. More... | |
static Vector3 | DirectionTo (this Transform tx, Vector3 position) |
Direction to point. More... | |
static bool | IsNear (this Transform tx, Vector3 position, float threshold) |
Determines whether this instance is near the specified tx position + threshold. More... | |
static Transform[] | Children (this Transform tx) |
Returns children of the transform. More... | |
|
inlinestatic |
Resets local position and rotation to identity (zero)
|
inlinestatic |
Returns children of the transform.
tx | Tx. |
|
inlinestatic |
Direction to point.
tx | Tx. |
position | Position. |
|
inlinestatic |
Distances to point.
tx | Tx. |
position | Position. |
|
inlinestatic |
Returns the closest transform from a list of transforms.
tx | A Transform |
list | A IList(Transform) The list of transforms to search through. |
|
inlinestatic |
Returnts the furthest transform from a list of transforms.
tx | A Transform |
list | A IList(Transform) The list of transforms to search through. |
|
inlinestatic |
Determines whether this instance has line of sight to another transform.
true
if this instance has line of sight to the specified other; otherwise, false
. tx | If set to true tx. |
other | If set to true other. |
|
inlinestatic |
Determines whether this instance is near the specified tx position + threshold.
true
if this instance is near the specified position + threshold; otherwise, false
. tx | If set to true tx. |
position | If set to true position. |
threshold | If set to true threshold. |
|
inlinestatic |
Smoothly rotate to look at a position over T seconds.
tx | A Transform |
position | A Vector3 The target world space position to look at. |
T | A System.Single The time taken to rotate to look at the target. |
|
inlinestatic |
Smooth rotate to look at a target over T seconds.
tx | A Transform |
target | A Transform The transform to look at. |
T | A System.Single The time taken to rotate to look at the target. |
|
inlinestatic |
Looks at a direction over T seconds, then run an action.
|
inlinestatic |
Looks at a transform over T seconds, then run an action.
|
inlinestatic |
Smoothly move along a path over T seconds.
tx | A Transform |
path | A IList(Transform) The list of transforms which make up the the path. |
T | The time taken to move from start to finish. A System.Single |
|
inlinestatic |
Smoothly move along a path over T seconds, looking at a transform.
tx | A Transform |
path | A IList(Transform) The list of transforms which make up the path. |
T | A System.Single The time taken to move from start to finish. |
lookAt | A Transform The transform to look at while moving. |
|
inlinestatic |
Smoothly move along a path over T seconds, optionaly looking forward along the path.
tx | A Transform |
path | A IList(Transform) The list of transforms which make up the path. |
T | A System.Single The time taken to move from start to finish. |
lookAlongPath | A System.Boolean If true, always look in the direction of travel. |
|
inlinestatic |
Smoothly move along a path over T seconds, then run an action.
|
inlinestatic |
Smoothly move along a path over T seconds, then run an action.
|
inlinestatic |
Smoothly move along a path over T seconds, then run an action.
|
inlinestatic |
Smoothly move to a position over T seconds using world or local position.
tx | A Transform |
position | A Vector3 The target position. |
T | A System.Single The time taken to move to the target. |
space | Space to operate in, world or local. |
|
inlinestatic |
Smoothly move to a position over T seconds.
tx | A Transform |
position | A Vector3 The target position. |
T | A System.Single The time taken to move to the target. |
|
inlinestatic |
Moves to a position of T seconds, then run an action.
tx | Tx. |
position | Position. |
T | T. |
OnFinish | On finish. |
|
inlinestatic |
Moves to a position of T seconds, then run an action.
tx | Tx. |
position | Position. |
T | T. |
OnFinish | On finish. |
space | Space to operate in, world or local. |
|
inlinestatic |
Pivot on vertical axis to face a direction in degrees.
tx | A Transform |
degrees | A System.Single The target degrees of the vertical axis. |
T | The time taken to move to the target. A System.Single |
|
inlinestatic |
Pivots to a direction over T seconds, then run an action.
|
inlinestatic |
Places the transform P (0-1) along path.
tx | Tx. |
path | Path. |
P | P. |
|
inlinestatic |
Place this transform P (0-1) along path.
tx | A Transform |
path | A IList(Vector3) The list of transforms that make up the path. |
P | A System.Single The percentage value (0-1) along the path. |
|
inlinestatic |
Returns the .position attributes from a list of transforms.
transforms | Transforms. |
|
inlinestatic |
Smoothly rotate to face direction over T seconds.
tx | A Transform |
direction | A Vector3 The target forward direction. |
T | A System.Single The time taken to rotate to the target direction. |
|
inlinestatic |
Rotates to a direction over T seconds, then run an action.
tx | Tx. |
direction | Direction. |
T | T. |
OnFinish | On finish. |
|
inlinestatic |
Smoothly rotate to face direction over T seconds.
tx | A Transform |
direction | A Vector3 The target forward direction. |
T | A System.Single The time taken to rotate to the target direction. |
space | Space to operate in, world or local. |
|
inlinestatic |
Rotates to a direction over T seconds, then run an action.
tx | Tx. |
direction | Direction. |
T | T. |
OnFinish | On finish. |
space | Space to operate in, world or local. |
|
inlinestatic |
Returns the .rotation attributes from a list of transforms.
transforms | Transforms. |
|
inlinestatic |
Returns a screen rect that is centred over this transform.
tx | A Transform |
width | A System.Single The width of the rectangle. |
height | A System.Single The height of the rectangle. |
|
inlinestatic |
Shake by amount units over T seconds.
tx | A Transform |
amount | A System.Single Maximum amount of shake, in world space. |
T | Shake for this amount of seconds. A System.Single |
|
inlinestatic |
Shiver an object by amount degrees over T seconds.
tx | A Transform |
amount | A System.Single Maximum amount of shiver, in degrees. |
T | A System.Single Shiver for this amount of seconds. |
|
inlinestatic |
Resets local position and rotation to identity (zero)