Interaction Highlights

From Space Engineers Wiki
Jump to navigation Jump to search
beginner
Learnings

How to add highlight functionality to interactible elements of a model.

How to troubleshoot issues with highlight empties.

How to create the model in the first place.

Overview
Related

This tutorial teaches you how to add “highlight functionality” to your block, outlining a certain part of the model in yellow when you target a conveyor, terminal, screen etc. It further explains how to edit existing highlight empties and how to troubleshoot any issues that might appear.

Seut interaction highlight tutorial.png

Setup Model & Spawn Empty

Step 1: Prerequisites
First of all, your blend file must of course contain the SEUT standard collections, specifically the Main-collection, and your model must be placed within it.
Step 2: Object Structure

Next, you will have to ensure that all separate parts of your model are parented to a single object or empty. As you can see in the following picture, all individual parts of my example model are parented to the empty named “Model”.


Seut interaction highlight tutorial 1.png
Step 3: Create Empty
In order to highlight an area of your block when the player interacts with it, you first need to define an interactable area. This is done by placing a specific empty though the  Add / Context Menu by first selecting the object you wish to be highlighted and then going to Add --> Create Empty --> Add Highlight Empty.
Step 4: Select Empty Type

A menu will appear in the bottom left of your 3D Viewport. Select the type of interaction you would like to be accessible through this surface. In my case, I want to add a highlight for the conveyor port so I choose Conveyor. The index (the number at the end of the empty’s name) is needed to differentiate multiple empties of the same type and you’ll need to ensure that you don’t have two empties of the same type with the same index number. Note that the object you selected initially will also get renamed in order to facilitate the connection between the empty and the object it highlights.


Seut interaction highlight tutorial 2.png

All listed highlight empties have hover-texts assigned to them containing more information. Simply move your cursor over the item in the list.
Step 5: Adjust Empty

Resize your empty to comfortably encompass the surface you would like to be highlighted. The empty defines the area where the crosshairs must be placed in order for the outline to appear.


Seut interaction highlight tutorial 3.png

Edit Existing Empties & Test Functionality

Step 1: Assign Empty to Object

In order to edit the object an existing highlight empty targets, select the empty and access its Object Data Properties. There, you’ll find a Space Engineers Utilities-panel, in which you can set the Highlight Object of the selected empty.


Seut interaction highlight tutorial 4.png

Objects that do not have the same parent as the highlight empty are not selectable as a target object. You must first move either the empty or the target object for both to be on the same level in the hierarchy.
Step 2: Rename Empty
Adjust the name of the target object to fit the naming scheme. If you don’t know what the scheme is, it might be easier to just recreate the highlight empty, as that will automatically rename the target object.
Step 3: Export & Test

Export the block and place it in your mod to load into your savegame. Then test whether everything works by placing your crosshair over the area where the empty is located and your highlight object should be highlighted.


Seut interaction highlight tutorial.png

You will need to completely restart (not just reload!) your game to test changes you’ve made to your model. The game will not properly load your changes and it will look like the change did not apply otherwise.

Troubleshooting

Highlight looks like a yellow square

Solution

If your highlight looks like a yellow square it means that something went wrong when associating your highlight empty with your highlight object. Ensure the following:

  • Both the empty and target object must be parented to the same object.
  • The empty and target object must conform to the naming scheme.
  • All indexes on the same empty type must be unique.
Seut interaction highlight tutorial 5.png