Description
The Left
property of the Transform
struct provides a Vector3
representing the left direction relative to the transform's current orientation. This is typically used in 3D space to determine the leftward direction from the perspective of the transform's rotation.
Usage
Use the Left
property when you need to calculate or apply transformations that involve moving or orienting objects to the left of the current transform's orientation. This property is read-only and is automatically calculated based on the transform's rotation.
Example
// Example of using the Left property
Transform myTransform = new Transform();
Vector3 leftDirection = myTransform.Left;
// Use the leftDirection to move an object to the left
myTransform.Position += leftDirection * moveSpeed * Time.Delta;