Overview
The Add Object and Remove Object actions allow you to spawn or despawn 3D objects during training execution. Unlike objects placed in the Scene Editor (which exist when the scene loads), these actions add or remove objects programmatically in response to learner actions or training events.Add Object
When to Use
- Dynamic spawning: create tools or components only when needed
- Conditional content: show objects based on learner choices or training path
- Task rewards: spawn a completed item after learner successfully completes a step
- Progressive complexity: add new objects as the training advances
- Collision or pickup mechanics: add items the learner can interact with or collect
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| Asset to Add | string | Yes | Select a 3D object from your asset library. This becomes the new object in the scene. |
| Position | X, Y, Z | No | Location in 3D space where the object spawns (in meters). |
| Rotation | X, Y, Z | No | Orientation of the object (in degrees). Default is (0, 0, 0). |
| Scale | X, Y, Z | No | Size of the object. Default is (1, 1, 1) — the asset’s native size. |
| Parent Object | string | No | (Optional) Make the new object a child of another object in the hierarchy. The new object will move/rotate with its parent. |
Key Behavior
- Immediate: The object appears instantly in the scene.
- Hierarchy: If you specify a Parent Object, the new object becomes a child and inherits transformations from its parent.
- Referenced later: Once added, the object can be referenced in other actions (Transform Object, Set Object Visibility, etc.).
Remove Object
When to Use
- Cleanup: remove objects that are no longer needed
- Destruction simulation: remove broken or discarded items
- Dynamic scene management: reduce scene complexity by removing objects
- Reset workflows: remove spawned objects to return to a clean state
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| Target Object | string | Yes | Select the object (from the scene hierarchy) to remove. This object is deleted from the scene. |
Key Behavior
- Permanent removal: The object is completely removed from the scene and cannot be restored (unless you Add it again).
- Children affected: If you remove a parent object, all child objects are also removed.
- References cleared: Any action referencing the removed object will have no effect if the object no longer exists.
Practical Examples
Spawn a Tool When Needed
Scenario: A learner must pick up a wrench to complete a repair task. The wrench doesn’t exist initially; it spawns when they click “get tool.”Add a button “Get Wrench” that triggers a transition with an action list:
- Add Object:
- Asset to Add:
wrench - Position: (1, 1, 0) — in front of the learner
- Rotation: (0, 45, 0) — rotated for visual interest
- Asset to Add:
- Set Variable:
hasWrench = true
Progressive Object Addition
Scenario: An assembly training adds components one step at a time as learners complete each step.Step 2: Learner adds the first component.
- Add Object:
component_a(position: 1, 1, 0, Parent Object:assembly_base)
Step 3: Learner adds the second component.
- Add Object:
component_b(position: -1, 1, 0, Parent Object:assembly_base)
Remove After Failure
Scenario: If a learner makes a mistake, remove the incorrectly placed object and reset them to try again.In the transition’s action list:
- Remove Object: Target Object:
misplaced_item - Set Variable:
attempts = attempts + 1 - Play Audio:
error_sound.mp3 - Transition back to the task state
Cleanup on State Exit
Scenario: A state spawns temporary objects (scaffolding, indicators, markers) that should be removed when exiting.In a state’s
onEntry:- Add Object:
left_marker(position: -2, 0, 0) - Add Object:
right_marker(position: 2, 0, 0)
Objects added via Add Object actions don’t persist if the scene is reloaded. If you reload the scene (e.g., via a Reload Training action), all dynamically added objects are removed.

