Vector3 NormalToWorld( Vector3& localNormal )

robot_2Generated
code_blocksInput

Description

The NormalToWorld method in the Transform struct converts a normal vector from local space to world space. This is useful when you need to transform a direction or normal vector that is defined in the local coordinate system of an object to the global coordinate system of the scene.

Usage

To use the NormalToWorld method, you need to have a Transform instance. Pass a reference to a Vector3 representing the local normal vector you wish to convert. The method will return a Vector3 that represents the normal in world space.

Example

// Example usage of Transform.NormalToWorld
Transform transform = new Transform();
Vector3 localNormal = new Vector3(0, 1, 0); // A normal pointing up in local space
Vector3 worldNormal = transform.NormalToWorld(ref localNormal);

// worldNormal now contains the normal vector in world space.