slider2.3 Creating a moveable lid

In this step, we want to create a box with a movable lid. To do this, drag the 3D model named "SM_Battery_Frame" from the folder Content\VRAssembling\Meshes into the viewport and position it as shown.

Now we will add the interactive lid. We can create it using the preconfigured components. To do this, click on Lever (Turnable).

circle-info

You can use a Lever (Turnable) whenever you want to rotate objects around a point by hand, without using a tool. It doesn't matter whether you're creating a lever, a valve, or a crank—this component is suitable for all of them.

Position the Turnable (Lever) actor as shown. Rotate it as needed in the viewport.

Make sure the Turnable (Lever) is selected and direct your attention to the Details panel. Our goal is to allow the VR user to open the lid upward by 90 degrees. To achieve this, set the Min Angle to -90 and the Max Angle to 0 under the Settings - Angle.

Want to know why to use the "Min Angle" in this chase? Follow the link:

https://app.gitbook.com/o/IBt9g6JQbFLV7h24wySf/s/knYRJUknjLWoBMSUBJev/~/changes/122/faq/3.0-how-to-determine-whether-you-need-to-use-the-min-angle-or-max-angle-for-the-lever-turnable

In the final step, set the Hand Range to a value of 10 to make handling the flap easier. This ensures that the user does not need to grab it with exact precision.

To activate the tunrable (Lever) actors and enable its functionality, we need to link them to our process logic.

For this, we will use the Tasklist Editor.

Open the Tasklist Editor and create a new section that contains a task. Assign the Turnable (Lever) (BP_Turnable_Base), which can be found under "Unused", to the new task.

Add a meaningful description under "Timer Section Title", "Monitor Section Text", and "Timer Task Title & Monitor Task Text" to support the user during execution. It should look something similar to that.

Now make sure that "Turn to Angle (degrees)" is selected for the actor. Set the target angle to -90 degrees.

circle-info

Attention! If you want to change the opening angle—for example, from -90 to -180 degrees—you need to select the actor in the viewport and enter the desired values manually. To update these changes in the Tasklist Editor, make sure to click the Refresh button.

You have now successfully created a movable lid. Now test it in VR.

Last updated