The Up
property of the Transform
struct represents 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.
The Up
property of the Transform
struct represents 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.
Use the Up
property to get the upward direction of a transform. This can be useful for aligning objects, calculating rotations, or determining movement directions in 3D space.
// 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