Creating an Unreal Engine-based simulator
Note: This tutorial has been tested with Unreal Engine version 5.6.1
In this tutorial, we’ll use the Unreal Engine to create a simple, not-so-fancy simulator that serves as a barebones boilerplate for Unreal-based simulators prepared for distributed simulation using the Inhumate RTI.
You’ll create a simple “walking simulator” where the player can move around using W, A, S, and D, drop boxes, and interact with the physics engine. Not exactly an exciting player experience, but it is a straightforward way to structure the project to take advantage of Inhumate Suite features. The simulator will support recording, playback, co-simulation (multiplayer), and much more.
Setup the project
Create a new Unreal project and prepare it with the Inhumate RTI Unreal Engine integration package.
- Create a new C++ project using the First Person template.
- Close the editor and create a folder named
Pluginsin your project root folder. - Copy the
InhumateRTIpackage folder into thePluginsfolder. - Double-click the
.uprojectfile. - Click
Yesto rebuild. - In the editor, make sure the plugin is enabled and verify you have a section called
Plugins - Inhumate RTIin your project settings.
Create and spawn boxes
To test the capabilities of this package, we want to add some extra interaction in the form of simulated boxes spawned by the player.
- Create a new Blueprint class with
Actoras the parent class and name itBP_Box. - Add a
Static Meshcomponent and set the static mesh property to theSM_ChamferCubemesh. - In the same component, enable
Simulate Physicsin the Physics section.
Now we will enable the player to spawn the boxes into the level.
- Create a new
Input Actionand name itIA_SpawnBox. - Map the action in the Input Mapping Context
IMC_Defaultfound in theInputfolder. AddIA_SpawnBoxunderMappingsand choose a key to spawn the box. - Open
FirstPerson/Blueprints/BP_FirstPersonCharacter. - Right-click in the
Event Graph, search forIA_SpawnBox, and add the event. - Connect
StartedtoSpawn Actor from Class, chooseBP_Box, and set the spawn transform in front of the player.

Play the level, spawn some boxes, and make sure their physics are simulated.
Add RTI components
Let’s add some components from our RTI Unreal integration package and then look at the results in Inhumate Viewer.
Note: These components determine how actors are represented in the Viewer and handled in the RTI. Feel free to change the values to suit your needs.
-
Add
RTI EntityandRTI Positioncomponents to the player blueprint. Set theTypeandSizeproperties.

-
Add
RTI EntityandRTI Positioncomponents to the box blueprint. Set theTypeandSizeproperties.

-
To see the level in the viewer, add the
RTI Static Geometrycomponent to all meshes in the level.- Create a new Blueprint class with
StaticMeshActoras the parent class. -
Add the
RTI Static Geometrycomponent to the blueprint.
- In the level
Lvl_FirstPerson, search for all static mesh actors in theOutlinerand select all actors (exceptSM_SkySphere). - Right-click and select
Replace All Selected Actors With, enableCopy Properties, and choose your blueprint.
- Create a new Blueprint class with
Start Inhumate Viewer. When you run the project, you should see the player, boxes, and the level rendered in the 3D tab in the viewer.
Support runtime control and scenario loading
Now we’ll prepare the project for runtime control and scenario loading using the RTI by creating a new level and some configuration.
- Create a new level called
Homeand open it. - Open the level blueprint (
Blueprints > Open Level Blueprint). - From the
BeginPlayevent, add aCreate Widgetnode. SelectRTI_UIin the Class pin.
For theScenario To Loadpin, specifyDemo. Add anAdd to Viewportnode and connectReturn ValuetoTarget. - Repeat step 3 for the level
Lvl_FirstPerson.
We have now added a runtime control UI in both levels. Next, we need to map the Demo scenario to Lvl_FirstPerson and set Home as the default level.
Note: For plugin settings, click
Set as Defaultif you want changes to persist after restart.
- Open
Edit > Project Settingsand find the Inhumate RTI settings underPlugins. - Set the
Home Levelproperty to your home level. -
In
Scenarios, add an element namedDemoand set the level toLvl_FirstPerson.
-
In
Project > Maps & Modes, set bothEditor Startup MapandGame Default Mapto your home level.
You should now have a functioning runtime control UI. Run the project, press Load, and watch the level change to your scenario level. Press Start, run around, spawn boxes, and see the viewer mirror your actions. Try the other controls: Pause, Stop, and Reset.
Support playback and co-simulation
To support playback and co-simulation, the scene needs an RTI spawner that dynamically adds entities (the player and spawned boxes). We also need a remote representation of the player during playback, since Unreal typically doesn’t behave well when moving pawns without player input.
-
Create a representation actor with your mesh and the
RTI EntityandRTI Positioncomponents.
- Create a new Blueprint class with
RTISpawnerActoras the parent class. Name itBP_Spawner. -
Add the representation and box actors to the spawner’s
Entity Type Actor Mappingproperty with typesboxandplayer.
-
Add nodes similar to the blueprint shown below:

In summary: if we’re in the
simulatingstate (after pressingStart) orunknown, we spawn the player and save a reference. If we are pressingStopwhilerunningwe destroy the player. We are also keeping a reference to the player controller for camera handling. During playback, spawn the representation actor instead. - Add
BP_SpawnertoLvl_FirstPersonand remove thePlayerStartactor, since spawning is now handled by the spawner.
With this setup, you are ready to test playback and co-simulation using Inhumate Recorder.
- Load a scenario, press
Start, play for a bit, then pressStopfollowed byPlay. - Replay earlier recordings using the three dots menu and selecting
Play. - Run another instance of the project to test co-simulation and verify you can see the other player.
Conclusion
You have now completed the basic setup for integrating the Inhumate Suite with an Unreal Engine project. Playback and co-simulation should be working, and you are ready to continue experimenting with additional features and configurations.