Overview
The Set Parent action changes an object’s parent in the 3D scene hierarchy at runtime. When an object has a parent, it moves, rotates, and scales together with that parent. This enables dynamic hierarchy changes—like attaching a tool to a hand, making one object follow another, or grouping objects programmatically.When to Use
- Attachment mechanics: attach a tool or part to a learner’s hand or avatar
- Following behavior: make one object follow and move with another
- Dynamic grouping: organize objects by making them children of a container
- Relative positioning: change how an object’s position is calculated relative to its parent
- Complex interactions: simulate picking up, placing, or installing objects
Parameters
Key Behavior
- Hierarchy update: The object’s position in the scene hierarchy changes; it is now a child of the new parent.
- Transformation inheritance: The object inherits transformations from its new parent. If the parent moves, rotates, or scales, the child moves/rotates/scales with it.
- World position handling: The
Maintain World Positionparameter controls whether the object visually “jumps” when reparented.true: Object stays where it was in world space; its local position is adjusted accordingly.false: Object’s local position relative to the parent stays the same, which may visually move it.
- Multiple changes: You can change an object’s parent multiple times during a training.
Practical Examples
Attaching a Tool to Hand
Scenario: A training shows a learner picking up a wrench. Once picked up, the wrench should move with the hand.1
Initial state:
wrench is on a table, not a child of anything (or a child of the table).2
Learner clicks “pick up wrench” button, triggering a transition:
- Transform Object: (animate the wrench to the hand position)
- Target Position: (hand coordinates)
- Duration:
500ms
- Set Parent:
- Object:
wrench - New Parent Object:
hand - Maintain World Position:
true(keep wrench visually where it is after animation)
- Object:
- Set Variable:
hasWrench = true
3
After this action, the wrench moves with the hand. If the hand moves, the wrench moves too.
Assembly Part Attachment
Scenario: A training shows parts being attached to an assembly. Each part should stick to the assembly and move with it.1
State
AssemblyLine:assembly_baseis the main object.- Learner adds
component_ato the assembly.
2
Transition triggered by clicking “Attach Component”:
- Transform Object: Animate
component_ato position on the assembly.- Target Position: (1, 0.5, 0) relative to assembly
- Duration:
1500ms
- Set Parent:
- Object:
component_a - New Parent Object:
assembly_base - Maintain World Position:
true
- Object:
3
Now
component_a is a child of assembly_base. If the assembly is moved or rotated later, the component moves with it.Multiple Parts to a Group
Scenario: A training shows grouping multiple components together under a parent object (a container or assembly frame).1
State
Grouping:- Objects exist:
component_a,component_b,component_c, and an empty parent objectgroup_container.
2
Transition triggered by clicking “Group Items”:
- Set Parent: Object:
component_a, New Parent:group_container, Maintain World Position:true - Set Parent: Object:
component_b, New Parent:group_container, Maintain World Position:true - Set Parent: Object:
component_c, New Parent:group_container, Maintain World Position:true
3
All three components are now children of
group_container. Moving the container moves all three at once.Reparent to Root (Detach)
Scenario: A tool is attached to a hand, but the learner drops it. The tool should detach and fall to the ground.1
Current state:
wrench is a child of hand.2
Transition triggered by “Drop Wrench” button:
- Set Parent:
- Object:
wrench - New Parent Object:
rootornull(no parent — makes it top-level in hierarchy) - Maintain World Position:
true(wrench stays where it was visually)
- Object:
- Play Audio:
wrench_drop_sound.mp3 - Set Variable:
hasWrench = false
3
The wrench is now detached and no longer moves with the hand.
Dynamic Positioning with Maintain World Position
Scenario: Understanding the difference betweenMaintain World Position: true and false.
1
Object
tool is at world position (5, 2, 0).- Current parent:
table(at world position 0, 0, 0).
workbench (at world position 10, 1, 0).2
If
Maintain World Position: true:- The tool stays visually at (5, 2, 0) in world space.
- Its local position relative to workbench is calculated to keep it in the same place.
- (Local position becomes approximately (-5, 1, 0) relative to workbench.)
3
If
Maintain World Position: false:- The tool’s local position relative to table is applied to workbench.
- If it was at local (5, 2, 0) on the table, it stays at local (5, 2, 0) on the workbench.
- The tool visually jumps to a new world position.
Reparenting an object does not change the object itself—only its relationship to other objects in the hierarchy. The object’s scale, material, or any other property remains unchanged.

