Verse Library verse

02 Fragment

Attaches entities as children or detaches them from the scene hierarchy.

verse-library/verse-scene-graph-hierarchy-transforms/02-fragment.verse

# Make BulbEntity a child of PoleEntity.
# AddEntities takes an array, so wrap a single child in array{...}.
PoleEntity.AddEntities(array{BulbEntity})

# Detach an entity from its parent (removes it from the scene).
BulbEntity.RemoveFromParent()

Comments

    Sign in to vote, comment, or suggest an edit. Sign in