Author: [Your Name]
Engine: Unreal Engine 5.x (C++ + Blueprints)
Purpose: A fully physics-based VR educational environment where students learn mechatronics through interactive, step-by-step device assembly.
This project simulates mechanical and electrical components of real-world devices (e.g., a DC Motor) in VR, allowing students to physically assemble parts, visualize behavior, and complete guided lessons. The goal is to create a modular, interactive, and educationally valuable experience.
- Physics-Based: All parts simulate physics, collisions, and constraints.
- Modular: Parts, behaviors, and lessons are reusable and data-driven.
- VR-Interactive: Users interact via motion controllers (grab, assemble, press).
- Lesson-Driven: Each level is a standalone educational lesson.
- Performance-Safe: Avoids shader stutter and runtime loading hitches.
Each .umap file is a separate lesson:
L_Lesson_01_Intro.umapL_Lesson_02_ArmatureAssembly.umap- ...
Each lesson is configured via:
DA_Lesson_01.uassetDA_Lesson_02.uasset- ...
Global state and flow manager:
ActiveLessonData(UDataAsset)LoadNextLesson(),StartLesson(FName)- Persistent across level transitions
Spawned per level. Controls:
TArray<ULessonStep*>(steps for current lesson)AdvanceStep(),CheckStepCompletion()
Step Types:
UAssembleStep: Waits for part snapUFocusStep: Waits for player to focus on objectUInteractionStep: Waits for UI or tool use
AAssemblyActor
- Contains
TArray<APartActor*> - Handles physics constraints
- Validates assembled state
APartActor
UStaticMeshComponent(SimulatePhysics = true)UAssemblyComponent(logical metadata)SnapPoints[](USnapPointComponent)BehaviorComponents[](UComponentBehavior)
Constraints:
- Created using
UPhysicsConstraintComponent - Types: Fixed, Hinge, Prismatic
- Configured based on SnapPoint metadata
UComponentBehavior (ActorComponent)
Attached to parts to trigger logic such as:
- Spinning motors
- Visualizing magnetic fields
- Showing educational overlays
Functions:
OnAssembled()OnActivated()OnDisassembled()
- VR motion controllers grab physics-enabled parts
- Snap validation via overlapping
SnapPoints - Valid connections trigger constraint creation
GameInstance
↓
Load Lesson Level (.umap)
↓
LessonManager reads DA_Lesson_XX
↓
Player interacts (grab, assemble, focus)
↓
SnapPoints matched → constraint created
↓
ComponentBehavior triggers
↓
LessonStep marked complete
↓
Advance to next step or next level
| From | To | Type | Purpose |
|---|---|---|---|
| Armature | Shaft | Hinge | Allows motor rotation |
| Shaft | Housing | Fixed | Holds motor in place |
| Commutator | Armature | Fixed | Rotates with motor |
| Brush | Commutator | None | Overlap triggers logic |
| Magnet | Housing | Fixed | Static field component |
- Shader hitches on first use
- Runtime loading stutter
-
Warm-Up Level (
L_WarmupShaders)- Place every material and mesh in-scene
-
Enable Shader Code Libraries
- Project Settings → Rendering
- Run:
RunUAT.bat BuildShaderArchive
-
Preload Assets
- Avoid runtime loading
- Use
StreamableManagerfor soft references
-
Use Fade or Loading Screen
- Prevents user interaction until everything’s ready
Each .umap is its own lesson.
- Contains its own
AAssemblyActor, parts, andALessonManager UGameInstancemanages flow between lessons- Each level uses a
DA_Lesson_XXto define:- Objectives
- Step sequence
- Instruction content
UGameInstance
└─ ActiveLessonData : UDataAsset
└─ LoadNextLesson()
ALessonManager
└─ Steps : TArray<ULessonStep>
├─ UAssembleStep
├─ UFocusStep
└─ UInteractionStep
AAssemblyActor
└─ APartActor[]
└─ UAssemblyComponent
├─ SnapPoints : USnapPointComponent[]
└─ Behaviors : UComponentBehavior[]
| Asset Type | Prefix | Example |
|---|---|---|
| Level | L_ |
L_Lesson_01_Intro |
| Lesson Data | DA_ |
DA_Lesson_01 |
| Part Actor | BP_ |
BP_Commutator |
| Snap Component | SPC_ |
SPC_BrushMount |
| Behavior Component | CB_ |
CB_SpinMotor |
- Blueprint lesson step system
- Behavior template expansion (fields, forces, visuals)
- Save/load student progress
- Performance profiling + hardware scaling
A modular, VR-based instructional simulation system built in Unreal Engine using:
- Physics-based part assembly
- Modular behaviors
- Blueprint-driven lessons
- Performance-optimized runtime
- Per-level instructional structure
Ready to scale into schools, labs, or interactive demos.