Description
The Parent
property of a SceneObject
represents the movement parent of the scene object, if any. This property allows you to establish a hierarchical relationship between scene objects, where the child object inherits transformations from its parent.
Usage
Use the Parent
property to get or set the parent SceneObject
of the current object. Setting this property will change the object's transformation hierarchy, making it a child of the specified parent object. If the parent is set to null
, the object will be directly under the SceneWorld
.
Example
// Example of setting a parent for a SceneObject
SceneObject childObject = new SceneObject();
SceneObject parentObject = new SceneObject();
// Set the parent of the childObject
childObject.Parent = parentObject;
// Access the parent of the childObject
SceneObject currentParent = childObject.Parent;
// Check if the childObject has a parent
if (currentParent != null)
{
// Perform operations knowing the object has a parent
}