Description
The GetWorldTransform
method of the TransformProxy
class retrieves the world transform of the associated game object. This transform represents the position, rotation, and scale of the object in the world space, as opposed to the local space of its parent object.
Usage
To use the GetWorldTransform
method, you need to have an instance of a class that inherits from TransformProxy
. Call the method on this instance to obtain the current world transform of the object.
Example
// Assuming 'transformProxy' is an instance of a class derived from TransformProxy
Transform worldTransform = transformProxy.GetWorldTransform();
// Use the worldTransform to access position, rotation, and scale in world space
Vector3 position = worldTransform.Position;
Quaternion rotation = worldTransform.Rotation;
Vector3 scale = worldTransform.Scale;