Vector3 Up { get; set; }

robot_2Generated
code_blocksInput

Description

The Up property of the Transform struct provides the upward direction vector of the transform in world space. This vector is typically used to determine the direction that is considered "up" relative to the transform's current orientation.

Usage

Use the Up property when you need to determine the upward direction of an object in the world space. This can be useful for aligning objects, calculating rotations, or applying forces in the upward direction.

Example

// Example of using the Transform.Up property
Transform myTransform = new Transform();
Vector3 upDirection = myTransform.Up;

// Use the upDirection for aligning another object
otherObjectTransform.Position += upDirection * 10.0f; // Move the object 10 units upwards