Struct LocalTransform
Position, rotation and scale of this entity, relative to the parent, or in world space, if no parent exists.
Namespace: Unity.Transforms
Assembly: Unity.Transforms.dll
Syntax
public struct LocalTransform : IComponentData, IQueryTypeParameter
Remarks
If the entity has a Parent component, LocalTransform is relative to that parent. Otherwise, it is in world space.
Fields
Name | Description |
---|---|
Identity | The identity transform. |
Position | The position of this transform. |
Rotation | The rotation of this transform. |
Scale | The uniform scale of this transform. |
Methods
Name | Description |
---|---|
Apply |
Scales this transform by the specified factor. |
Equals(in Local |
Checks if a transform has equal position, rotation, and scale to another. |
Forward() | Gets the forward vector of unit length. |
From |
Returns the Transform equivalent of a float4x4 matrix. |
From |
Returns the Transform equivalent of a float4x4 matrix. Throws and exception if the matrix contains nonuniform scale or shear. |
From |
Returns a Transform initialized with the given position. Rotation will be identity, and scale will be 1. |
From |
Returns a Transform initialized with the given position. Rotation will be identity, and scale will be 1. |
From |
Returns a Transform initialized with the given position and rotation. Scale will be 1. |
From |
Returns a Transform initialized with the given position, rotation and scale. |
From |
Returns a Transform initialized with the given rotation. Position will be 0,0,0, and scale will be 1. |
From |
Returns a Transform initialized with the given scale. Position will be 0,0,0, and rotation will be identity. |
Inverse() | Gets the inverse of this transform. |
Inverse |
Transforms a direction by the inverse of this transform. |
Inverse |
Transforms a point by the inverse of this transform. |
Inverse |
Transforms a rotation by the inverse of this transform. |
Inverse |
Transforms a scale by the inverse of this transform. |
Inverse |
Transforms a Local |
Right() | Gets the right vector of unit length. |
Rotate(quaternion) | Rotates this Transform by the specified quaternion. |
Rotate |
Rotates this Transform around the X axis. |
Rotate |
Rotates this Transform around the Y axis. |
Rotate |
Rotates this Transform around the Z axis. |
To |
Gets the float4x4 equivalent of the inverse of this transform. |
To |
Gets the float4x4 equivalent of this transform. |
To |
Convert transformation data to a human-readable string |
Transform |
Transforms a direction by this transform. |
Transform |
Transforms a point by this transform. |
Transform |
Transforms a rotation by this transform. |
Transform |
Transforms a scale by this transform. |
Transform |
Transforms a Transform by this transform. |
Translate(float3) | Translates this transform by the specified vector. |
Up() | Gets the up vector of unit length. |
With |
Creates a transform that is identical but with a new position value. |
With |
Gets an identical transform with a new position value. |
With |
Gets an identical transform with a new rotation value. |
With |
Gets an identical transform with a new scale value. |