void SetWorldTransform( Transform value )

book_4_sparkGenerated
code_blocksInput

Description

The SetWorldTransform method in the TransformProxy class is used to set the world transform of a game object. This method allows you to specify the global position, rotation, and scale of the object in the scene.

Usage

To use the SetWorldTransform method, you need to have an instance of a TransformProxy object. You can then call this method with a Transform object that represents the desired world transform.

Ensure that the Transform object you pass as a parameter is correctly configured with the position, rotation, and scale you want to apply to the game object in the world space.

Example

// Assuming 'transformProxy' is an instance of TransformProxy
Transform newWorldTransform = new Transform();
newWorldTransform.Position = new Vector3(10, 0, 5);
newWorldTransform.Rotation = Rotation.From(45, 0, 0);
newWorldTransform.Scale = new Vector3(1, 1, 1);

transformProxy.SetWorldTransform(newWorldTransform);