3.6 AXIS Mover
In the next step, we want to create a lever that, when operated, makes a removable gear appear.
To achieve this, we need two actors:
the familiar Lever (Turnable)
and the newly introduced Axis Mover.
Place a Lever in the scene using the Tool Spawner.


To give the lever a more distinctive appearance, go to the folder VRAssembling/Meshes and select the 3D model named SM_Lever_Test.

Now switch to the Viewport and make sure the Lever is still selected. Go to the Details Panel under "Settings – Meshes" and assign the new mesh using the arrow button.
The result should look as follows.

Under Mesh Pivot Transform, adjust the orientation of the lever as follows:

In the next step, we’ll define the rotation angle for the lever. To do this, go to Settings – Angles and set the values as follows:

Check the box at "Invert Progress"

In the next step, bring the Axis Mover into the scene using the Tool Spawner. This actor is used to move arbitrary objects along a defined axis.

Select the Axis Mover and focus on the Details Panel. Under Settings, you can set the Distance to define how far an object should move. For testing purposes, set this value to 60.

As you can see, the distance is also displayed visually. In this case, the bar points to the right.
We want to rotate it upwards instead. Due this in the viewport with the rotate transfor tool.

Position the Axis Mover lower and place it beneath the table. We want an object to emerge from below the table.

In the next step, we need to link the Lever Turnable with the Axis Mover.
To do this:
Select the Lever.
In the Details Panel, go to "Settings – Action Handlers".
Click the plus symbol next to "Progress Handlers".
Use the eyedropper tool to select the Axis Mover in the scene.

Now, when the lever is moved, an object will be pushed along the Axis Mover based on the lever’s movement amplitude.
In the next step, we want to add an object that will be moved along the Axis Mover.
You can use any object for this purpose.
In our case, we want to push a gear along the axis, which we will make grabbable in the following step.

To achieve this, drag a gear mesh from the Meshes folder into the Viewport.
Then, use the Transformer Moveable (Basic) and set its mode to Disassembly to create a grabbable object.
Finally, click on Spawn to place it in the scene.

We want the gear to start at the bottom in its initial position.
Move it downward until it aligns with the starting point of the Axis Mover.

In the final step, we assign the object we just created to the Axis Mover. This ensures that the Axis Mover knows which object to move.
To do this:
In the Outliner, select the object (e.g., Slot_Holo).
Right-click on it.
Then select "Attach To" and use the eyedropper tool. With the eyedropper, click on the Axis Mover to assign the object to
As you can now see in the Outliner, the Gear Holo and its part have become child objects of the BP_Axis Mover.

Now create a new section in the Task List Editor and assign the Lever Turnable to the task. It should look as follows:

Now test the section in VR to ensure everything works as intended. Verify that:
The lever moves as expected.
The gear travels along the Axis Mover.
Last updated