Spacecraft: Creating a Simulation
Creating a Level
A new simulation can be constructed by creating a level. Navigate to the Content browser in the Unreal Engine once Nominal Editor has been opened and create a new Level asset. This can be done by right-clicking on a blank space in the Content Browser
(or in a directory) and selecting Level
.
Note
Nominal structures the demo levels to be located inside a dedicated folder, which may also contain other assets, in the form of blueprints, associated with that scenario. This helps keep scenarios organized but is not strictly necessary.
Once it is created, give it an appropriate name. In this case, the level will be named Tutorial_01_Spacecraft
. Double-click on the level to open it within Unreal. Only one level can be opened at a time and a level must be opened at all times. Now that the level has been double-clicked, it can be edited and executed.
Note
If prompted, save all assets. It is good practice to save the level blueprints whenever changes are being made to them. Keeping an eye on unsaved assets can ensure that work is recovered, in the case of an engine crash.
The level is the main file that is executed when the Unreal play button is pressed. However, it is recommended that the simulation is scripted using a separate blueprint so that multiple-level blueprints can be opened at once. For examples of this, please refer to the demos and tutorials provided which contain an associated Blueprint file housing the logic for the simulation.
To create this second blueprint, right-click again on the content browser and select Blueprint Class
. Then, in the pop-up window, in the search bar search for Demo
and select the BP_DemoActor
as the base class for the scenario file.
Note
Typically, the scenario Blueprint is called the same name as the level file, except with the BP_
at the start of the file name. This is not a requirement but only a standard Nominal has adopted to keep the files neat.
At this point, there should be two files located in their folder. This folder design is the same across all tutorial and demo files provided with Nominal Editor.
Before the code can be developed, ensure the blueprint scenario file (BP_Tutorial_01_Spacecraft
) is located within the level. Ensure that the level is opened (by double-clicking on the level file) and then dragging the blueprint, whilst holding down the left-button on the mouse, into the black viewport. This will add it to the level and will show up in the outliner.
Note
The viewport is the main centre window that appears on the Unreal Engine widget. When the level is not played, it will be black indicating it is an empty scene with no objects. More information can be found on the Unreal Engine official documentation:
Unreal Editor Interface | Unreal Engine 5.4 Documentation | Epic Developer Community
Running a Simulation
The process of setting up a level is the same for all scenario files. Due to Unreal’s limitations of simultaneous level blueprints being opened, this is the desired pathway for level creation. By default, an empty simulation will include the planets in the solar system and an observer to move around in. Hitting the play button will show the view in the game:
To navigate the view, use the mouse right-click to orbit the Earth and the mouse scroll-wheel to zoom in and out of the view. Using the WASD keys, the camera can be moved around the level in the direction it is looking.
Note
The default viewport and UI are enabled in all Editor levels without needing to add it in. The options toggle in the top-right will show the various visualization tools available within the view. Clicking on the planet drop-down will enable moving between different planet views and snapping back to the Earth.