The GetWorldTransform
method retrieves the world transform of the associated game object. This transform represents the object's position, rotation, and scale in the world space, as opposed to its local space relative to its parent.
The GetWorldTransform
method retrieves the world transform of the associated game object. This transform represents the object's position, rotation, and scale in the world space, as opposed to its local space relative to its parent.
To use the GetWorldTransform
method, call it on an instance of a class that inherits from TransformProxy
. This method does not take any parameters and returns a Transform
object representing the world transform.
// Assuming 'transformProxy' is an instance of a class derived from TransformProxy Transform worldTransform = transformProxy.GetWorldTransform(); // Accessing position, rotation, and scale from the world transform Vector3 position = worldTransform.Position; Quaternion rotation = worldTransform.Rotation; Vector3 scale = worldTransform.Scale;