Enforces uniform scaling by setting the x, y, and z scale components of the associated transform to be equal. More...
Public Member Functions | |
void | Awake () |
Protected Member Functions | |
void | UnifyScale () |
Synchronizes the component values of the game object's local scale vector (e.g. [1,2,3] becomes [3,3,3]). More... | |
Properties | |
float | localScale [get, set] |
The size of the object as a single float value, rather than a scale vector. More... | |
Vector3 | position [get, set] |
The position vector for the associated transform. More... | |
Quaternion | rotation [get, set] |
The rotation vector for the associated transform. More... | |
Private Member Functions | |
void | Update () |
Private Attributes | |
Vector3 | _previousScale |
Enforces uniform scaling by setting the x, y, and z scale components of the associated transform to be equal.
Definition at line 26 of file UniformScaleTransform.cs.
void TiltFive.UniformScaleTransform.Awake | ( | ) |
Definition at line 106 of file UniformScaleTransform.cs.
References TiltFive.UniformScaleTransform._previousScale, and TiltFive.UniformScaleTransform.UnifyScale().
|
protected |
Synchronizes the component values of the game object's local scale vector (e.g. [1,2,3] becomes [3,3,3]).
The vector component with the most extreme deviation from the previous uniform scale vector will be selected. If the previous scale was [2,2,2] and the current scale is [5, 15, 50] then the result will be [50, 50, 50]. This also applies for negative values: [5, -20, 10] would result in [-20,-20,-20].
Definition at line 81 of file UniformScaleTransform.cs.
References TiltFive.UniformScaleTransform._previousScale.
Referenced by TiltFive.UniformScaleTransform.Awake(), and TiltFive.UniformScaleTransform.Update().
|
private |
Definition at line 116 of file UniformScaleTransform.cs.
References TiltFive.UniformScaleTransform.UnifyScale().
|
private |
Definition at line 66 of file UniformScaleTransform.cs.
Referenced by TiltFive.UniformScaleTransform.Awake(), and TiltFive.UniformScaleTransform.UnifyScale().
|
getset |
The size of the object as a single float value, rather than a scale vector.
Definition at line 33 of file UniformScaleTransform.cs.
|
getset |
The position vector for the associated transform.
Definition at line 46 of file UniformScaleTransform.cs.
|
getset |
The rotation vector for the associated transform.
Definition at line 55 of file UniformScaleTransform.cs.
Referenced by TiltFive.TrackableCore< TSettings, TState >.GameboardToWorldSpace(), TiltFive.TrackableCore< TSettings, TState >.Update(), and TiltFive.TrackableCore< TSettings, TState >.WorldToGameboardSpace().