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.

  1. Create a new C++ project using the First Person template.
  2. Close the editor and create a folder named Plugins in your project root folder.
  3. Copy the InhumateRTI package folder into the Plugins folder.
  4. Double-click the .uproject file.
  5. Click Yes to rebuild.
  6. In the editor, make sure the plugin is enabled and verify you have a section called Plugins - Inhumate RTI in 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.

  1. Create a new Blueprint class with Actor as the parent class and name it BP_Box.
  2. Add a Static Mesh component and set the static mesh property to the SM_ChamferCube mesh.
  3. In the same component, enable Simulate Physics in the Physics section.

Now we will enable the player to spawn the boxes into the level.

  1. Create a new Input Action and name it IA_SpawnBox.
  2. Map the action in the Input Mapping Context IMC_Default found in the Input folder. Add IA_SpawnBox under Mappings and choose a key to spawn the box.
  3. Open FirstPerson/Blueprints/BP_FirstPersonCharacter.
  4. Right-click in the Event Graph, search for IA_SpawnBox, and add the event.
  5. Connect Started to Spawn Actor from Class, choose BP_Box, and set the spawn transform in front of the player.

player_graph

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 Entity and RTI Position components to the player blueprint. Set the Type and Size properties.

    entity_player position_player

  • Add RTI Entity and RTI Position components to the box blueprint. Set the Type and Size properties.

    entity_box position_box

  • To see the level in the viewer, add the RTI Static Geometry component to all meshes in the level.

    1. Create a new Blueprint class with StaticMeshActor as the parent class.
    2. Add the RTI Static Geometry component to the blueprint.

      geometry

    3. In the level Lvl_FirstPerson, search for all static mesh actors in the Outliner and select all actors (except SM_SkySphere).
    4. Right-click and select Replace All Selected Actors With, enable Copy Properties, and choose your blueprint.

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.

  1. Create a new level called Home and open it.
  2. Open the level blueprint (Blueprints > Open Level Blueprint).
  3. From the BeginPlay event, add a Create Widget node. Select RTI_UI in the Class pin.
    For the Scenario To Load pin, specify Demo. Add an Add to Viewport node and connect Return Value to Target.
  4. 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 Default if you want changes to persist after restart.

  1. Open Edit > Project Settings and find the Inhumate RTI settings under Plugins.
  2. Set the Home Level property to your home level.
  3. In Scenarios, add an element named Demo and set the level to Lvl_FirstPerson.

    plugin_settings

  4. In Project > Maps & Modes, set both Editor Startup Map and Game Default Map to your home level.

    map_settings

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.

  1. Create a representation actor with your mesh and the RTI Entity and RTI Position components.

    bp_settings

  2. Create a new Blueprint class with RTISpawnerActor as the parent class. Name it BP_Spawner.
  3. Add the representation and box actors to the spawner’s Entity Type Actor Mapping property with types box and player.

    spawner

  4. Add nodes similar to the blueprint shown below:

    graph_spawner

    In summary: if we’re in the simulating state (after pressing Start) or unknown, we spawn the player and save a reference. If we are pressing Stop while running we destroy the player. We are also keeping a reference to the player controller for camera handling. During playback, spawn the representation actor instead.

  5. Add BP_Spawner to Lvl_FirstPerson and remove the PlayerStart actor, 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 press Stop followed by Play.
  • 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.


Copyright © Inhumate AB 2026