The Left
property of the Transform
struct provides the left direction vector relative to the transform's current orientation. This vector is typically used to determine the leftward direction in the local space of the transform.
The Left
property of the Transform
struct provides the left direction vector relative to the transform's current orientation. This vector is typically used to determine the leftward direction in the local space of the transform.
Use the Left
property to obtain the left direction vector of a transform. This can be useful for operations such as moving an object to the left relative to its current orientation or calculating directional vectors for physics or AI.
// Example of using the Left property Transform transform = new Transform(); Vector3 leftDirection = transform.Left; // Move an object to the left by 1 unit Vector3 newPosition = transform.Position + leftDirection; transform.Position = newPosition;