Download

Teleport to host player postion (collab viewer template)

Hi everyone !

I am a beginner in programming with unreal engine.

I’m trying to set up a feature (button) in the collab viewer template that allows a player to teleport to the position of the player who is hosting the session.

My problem is divided into two axes :
- find which player is hosting the session then locate him,
- create a button that once pressed, teleports the player to the host’s position.

Do you know how to do that ?

Thanks in advance !

Have you tried to code anything yourself yet?
If not I’d suggest giving this a go first.

Theres plenty of tutorials/documentation around networking.
Networking Overview | Unreal Engine Documentation looks quite a good place to start, but youtube is also there if you dont like reading.

1 Like

Regarding the button I’m not sure if you mean a button displayed on the users screen (think like a settings symbol) in which case you’ll want to look at Widgets.

If you mean a button in the level you can walk up to and press (like an elevator door button in a level) there’s plenty of tutorials available for things like this. Googling “create a button ue4” brings up multiple results.

1 Like

Hello @something45
Thank you for your answers !

I wanted to mean widget actually.
I already have some things in place yes.

Now i’m trying to create a controller variable which memorizes the host player, then use this variable in the teleportation blueprint to make a get actor location and then make a set actor location for the other players.

As you can see from the screenshots, i cannot create this controller variable … do you know why?

Then my other problem is which blueprint class to use for teleportation: pawn, actor, actor component …?

Thank you in advance !

In regards to the Error, if you highlight over the word Error it should give you some hints as to the cause.
For Teleport node, as Pawn inherits from Actor I believe you should be able to use the Pawn reference.

I will try this !

Thanks for your availability !