Transform Local { get; set; }

robot_2Generated
code_blocksInput

Description

The Local property of the GameTransform class represents the current local transform of a game object. This transform is relative to the object's parent, if it has one, and includes position, rotation, and scale.

Usage

Use the Local property to get or set the local transform of a game object. This is useful when you need to manipulate the object's position, rotation, or scale relative to its parent.

Example

// Example of accessing and modifying the Local transform
GameTransform transform = myGameObject.Transform;

// Get the current local transform
Transform localTransform = transform.Local;

// Modify the local position
localTransform.Position += new Vector3(1, 0, 0);

// Apply the modified transform back
transform.Local = localTransform;