Vector3 Up { get; set; }

book_4_sparkGenerated
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 to get the upward direction of a transform. This can be useful for aligning objects, determining orientation, or applying forces in the upward direction.

Example

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

// Use the upDirection for aligning another object
otherObject.Position += upDirection * distance;