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 direction opposite to the Up
direction, which is often aligned with the negative Y-axis in a standard 3D coordinate system.
Usage
Use the Down
property when you need to calculate or apply transformations that require knowledge of the downward direction relative to an object's current orientation. This can be useful in physics calculations, such as applying gravity or determining the direction of a downward force.
Example
// Example of using the Down property
Transform transform = new Transform();
Vector3 downDirection = transform.Down;
// Use downDirection for applying a force or movement
Vector3 force = downDirection * 9.81f; // Simulating gravity
// Apply the force to an object
// object.ApplyForce(force);