Verse Library verse

04 Fragment

Retrieves and updates an entity's world or local position, rotation, and scale.

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

# Read the entity's position relative to its parent.
Local := MyEntity.GetLocalTransform()

# Read the entity's true position in the world.
World := MyEntity.GetGlobalTransform()

# Move the entity relative to its parent.
MyEntity.SetLocalTransform(NewLocalTransform)

# Place the entity at an absolute spot in the world.
MyEntity.SetGlobalTransform(NewWorldTransform)

Comments

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