In Unreal Engine, creating the elevator platform is a great way to learn about moving objects and player interaction. This tutorial will guide you through setting up an elevator platform that moves up and down when triggered by the player.
Start by creating a new Blueprint Class. Choose “Actor” as the parent class and name it “ElevatorPlatform_BP.” Open the Blueprint to begin adding components.
In the Blueprint Editor, click “Add Component” and select “Static Mesh.” This will be the platform for the elevator. Choose a simple mesh like a cube or create a custom platform by assigning a material and scaling it to the desired size.
Next, add a “Box Collision” component to the Blueprint. This will act as the trigger for the elevator. Resize the Box Collision to cover the area where the player will stand to activate the elevator. In the Details panel, ensure the collision is set to detect overlaps.
Open the Event Graph of the Blueprint. Add an “On Component Begin Overlap” event for the Box Collision. This event will trigger the elevator when the player steps onto the platform. To make the platform move, you will use a “Timeline.”
Add a Timeline node in the Event Graph. Double-click it to open the Timeline Editor. Create a “Float Track” in the Timeline and add two keyframes: one at the start with a value of 0 and one at the end with a value of the platform’s height when fully raised. Adjust the Timeline’s duration to control the speed of the elevator.
Back in the Event Graph, connect the Timeline’s “Update” pin to a “Set Relative Location” node for the platform’s Static Mesh component. Use a “Lerp (Vector)” node to interpolate the platform’s position between its starting point and its target height. Connect the Timeline’s float output to the Lerp’s alpha input.
To return the elevator to its starting position, use the “On Component End Overlap” event of the Box Collision. Connect this event to the “Reverse” pin of the Timeline, so the platform moves back down when the player steps off.
Test the elevator by placing the Blueprint in the level and playing the game. Adjust the Timeline or collision box settings if needed. This setup creates a functional elevator platform that moves smoothly based on player interaction.
![Building the Elevator Platform](https://www.vskills.in/certification/tutorial/wp-content/uploads/2025/01/practice-test-banners.png)