TransformState
Class in ChivalrousGames.Common
Description
A snapshot of a transform’s position, rotation and scale
Properties
Position | Vector3 | ReadOnly Gets the position. |
Rotation | Quaternion | ReadOnly Gets the rotation. |
Scale | Vector3 | ReadOnly Gets the scale. |
Constructors
Constructor
public TransformState(Vector3 position, Quaternion rotation, Vector3 scale);
Parameters
Position | Vector3 | Position. |
Rotation | Quaternion | Rotation. |
Scale | Vector3 | Lossy scale. |
Return
TransformState | Instance of TransformState |
Description
Initializes a new instance of the TransformState class.
Constructor
public TransformState(Transform transform);
Parameters
transform | Transform | Transform. |
Return
TransformState | Instance of TransformState |
Description
Initializes a new instance of the TransformState class.
Methods
Set
public void Set(Transform transform);
Parameters
transform | Transform | Transform. |
Description
Set the position, rotation and scale from the specified transform.
IsDifferent
public bool IsDifferent(Transform transform);
Parameters
transform | Transform | Transform. |
Return
bool | True if this instance is different than the specified transform (comparing position, rotation and scale only); otherwise, false. |
Description
Determines whether the recorded position, rotation and scale from this instance is different than those of the specified transform.