Vector3 PointToWorld( Vector3& localPoint )

book_4_sparkGenerated
code_blocksInput

Description

The PointToWorld method of the Transform struct converts a point from local space to world space. This is useful when you need to determine the world position of a point that is defined relative to a specific transform.

Usage

To use the PointToWorld method, you need to have a Transform instance. You pass a Vector3 reference representing the local point you want to convert. The method returns a Vector3 representing the point in world space.

Example

// Example usage of Transform.PointToWorld
Transform transform = new Transform();
Vector3 localPoint = new Vector3(1, 2, 3);
Vector3 worldPoint = transform.PointToWorld(ref localPoint);

// worldPoint now contains the world space coordinates of the localPoint.