How to teleport players through interactions?
Here is a step-by-step tutorial to teleport players using the button interaction
How to teleport players through interactions?
First Step
The basics for all behaviors
The basics for all behaviors
- Tap on the object to which you want to add a behavior
- With the object selected, tap on the “Details” button to the left of your screen.
- In the Details panel, tap “Add Behavior”.
Second Step
Decide what will trigger the behavior. In this case, we are using “Interaction”, which shows a button when getting closer to the object that the behavior is added to.
Third Step
Go to the “Game Actions” section, select the “Set Player Position” block, and set the coordinates for the teleport. Alternatively, you can build a custom logic with further data by tapping on the position number and, instead of typing something, selecting “Add custom graphs’” For example, setting the teleport position to an object in your game (see custom graph image below).
Behavior Image
Behavior Image
Behavior Block | Nodes (custom graph) |
---|---|
![]() | ![]() |
Fourth Step
Exit the Behavior Editor, playtest and ensure it works as expected!