robot_2Generated
code_blocksInput

Description

The SetLocalTransform method is a virtual method of the TransformProxy class in the Sandbox namespace. It is used to set the local transformation of a game object. This transformation includes position, rotation, and scale relative to the object's parent.

Usage

To use the SetLocalTransform method, you need to pass a reference to a Transform object that represents the desired local transformation. This method modifies the local transformation of the game object associated with the TransformProxy instance.

Ensure that the Transform object passed is properly initialized with the desired position, rotation, and scale values.

Example

// Example usage of SetLocalTransform
TransformProxy transformProxy = new TransformProxy();
Transform newLocalTransform = new Transform();

// Set the desired local position, rotation, and scale
newLocalTransform.Position = new Vector3(1.0f, 2.0f, 3.0f);
newLocalTransform.Rotation = new Rotation(0.0f, 90.0f, 0.0f);
newLocalTransform.Scale = new Vector3(1.0f, 1.0f, 1.0f);

// Apply the local transform to the game object
transformProxy.SetLocalTransform(ref newLocalTransform);