by painapple

Titanfall 2 and Dishonored 2, both released in 2016, feature time-travel levels that leave a strong impression on players, utilizing the same clever method. This game mechanic provided an excellent shooting and assassination experience.

Wall run is a common mechanic in action-platform games, providing a smooth first-person action experience. This guide will step-by-step demonstrate how to implement this feature in Unreal Engine 5.4 using Blueprints.

Time Travel Game Mechanic

The principle is that there are two identical scenes at different heights. Whenever the player uses the ability, changing the player's Z-axis coordinate allows for seamless switching without loading times.

6070738488289389ae84b28fde0819e.jpg

I created two platforms, one at Z-axis 5510 and the other at 15510.

In Unreal Engine, open Project Settings from the Edit menu in the top left corner. In the Engine section, under Input, add Action Mappings. I chose the E key on the keyboard as the interaction key. Since my game is called Multiverse Racer, I named this functionality "multiverse travel.”

28162f0fd813907957d7b0bb4a6a22e.png

I am using Unreal Engine's default first-person template. In the Content folder, open the Blueprints folder and select the FirstPersonCharacter Blueprint. Right-click and add the previously created "multiverse travel" action.

8ae2f9a839d1c2509bdb836bd45bf1d.png

Get the player's Z-axis position and check if the Z-axis value is greater than 15510.

522e1a62a89863ae0afbe3081f7cf38.png

Use a Branch node to check the condition. If the Z-axis value is greater than 15510, reduce the player's Z-axis coordinate by 10,000 units.