Description
The Transform
property of a SceneObject
provides the transformation details of the object within the scene. This transformation is relative to the object's parent, if a parent is set, or to the SceneWorld
if no parent is specified. The transformation includes position, rotation, and scale, which define how the object is positioned and oriented in the 3D space.
Usage
Use the Transform
property to get or set the transformation of a SceneObject
. This can be useful for moving, rotating, or scaling the object within the scene. If the object has a parent, the transformation is relative to that parent; otherwise, it is relative to the SceneWorld
.
Example
// Example of accessing and modifying the Transform property of a SceneObject
// Assume 'sceneObject' is an instance of SceneObject
Transform currentTransform = sceneObject.Transform;
// Modify the position of the scene object
currentTransform.Position += new Vector3(10, 0, 0);
// Apply the modified transform back to the scene object
sceneObject.Transform = currentTransform;