Vector3 Position { get; set; }

robot_2Generated
code_blocksInput

Description

The Position property of a SceneObject represents its location in 3D space. This position is relative to the object's parent, if one is set, or to the SceneWorld if no parent is specified. The property is of type Vector3, which encapsulates three-dimensional coordinates (x, y, z).

Usage

Use the Position property to get or set the location of a SceneObject within its scene. This can be useful for moving objects around in a game world or for positioning them relative to other objects.

Example

// Example of setting the position of a SceneObject
SceneObject myObject = new SceneObject();
myObject.Position = new Vector3(10.0f, 5.0f, 3.0f);

// Example of getting the position of a SceneObject
Vector3 currentPosition = myObject.Position;

// Output the current position
// Note: Use a logging system or UI element to display the position
// Example: Log.Info($"Current Position: {currentPosition}");