Vector3 LocalPosition { get; set; }

robot_2Generated
code_blocksInput

Description

The LocalPosition property represents the position of a GameTransform in local coordinates. This property is used to get or set the position relative to the parent transform, rather than in world space.

Usage

Use the LocalPosition property to manipulate the position of a GameTransform within its local coordinate system. This is particularly useful when you want to position an object relative to its parent object.

Note that this property is marked as obsolete, and it is recommended to use LocalPosition directly instead of Transform.LocalPosition.

Example

// Example of setting the LocalPosition of a GameTransform
GameTransform transform = new GameTransform();
transform.LocalPosition = new Vector3(1.0f, 2.0f, 3.0f);

// Example of getting the LocalPosition of a GameTransform
Vector3 localPos = transform.LocalPosition;

// Note: This property is obsolete, consider using the recommended alternatives.