Vector3 Down { get; set; }

book_4_sparkGenerated
code_blocksInput

Description

The Down property of the Transform struct provides a Vector3 representing the downward direction relative to the transform's current orientation. This is typically used to determine the local downward direction in 3D space, which can be useful for physics calculations, such as applying gravity or determining the direction of a downward force.

Usage

Use the Down property when you need to obtain the downward direction vector of a Transform in its local space. This can be particularly useful in scenarios where you need to apply forces or perform calculations relative to the object's orientation.

Example

// Example of using the Down property
Transform transform = new Transform();
Vector3 downDirection = transform.Down;

// Use downDirection for applying a force or checking collision
// For example, applying a gravity force
Vector3 gravityForce = downDirection * 9.81f;