How to teleport from ingame menu in VR-template

Hi. I’m working on an VR archviz project where I’ve used the VR template as a base. Teleportation using the blue line on the floor works well.

But how can I open up an ingame menu with the shoulder button, where I can have buttons that teleports the pawn (player) to other rooms in the model?

I’ve tried all sorts of things, but always end up with some strange non-working casts to or menus that aren’t clickable or rotating correctly to the camera, because apparently it’s not possible to write blueprints in the interaction widget that refers to actors and teleportations.

I’m using . Please help.

Thank you.

I think you need something called “Nav Mesh Bounds Volume” or similar, the teleporter can only teleport if that exists. Have a look in the viewport of the template and search for it

Edit:
I am not sure if that’s what you want but I hope so ? cause you were saying teleport. Or did you mean travel? As in map changing?

Thanks for your response.
I have got that kind of teleporting in order. But in addition to this, I want a menu popping up when pushed Trigger on the Motion Controller with buttons from an Interaction Widget, where each button triggers a teleport (or instant pawn movement) to another location on the same map. Like teleporting from one floor to another, or a room to another.

Alright so you want to create something similar to the Waypoints in Diablo 2? ;D
Well, assuming you know how to open the menu, I think you could simply just update the location of the playercontroller->getControlledPawn to the new destination I guess. Although, if you want some sort of animation for that, you may also play it, unfortunately I cannot guide you on how to do that.

I know how to open the menu, but I haven’t figured out how to make it appear in front of the VR camera. I also haven’t understood how to update the location of the playercontroller in the widget blueprint. On the other hand, I can’t do anything based on the trigger in the widget blueprint, because the OnEvent custom trigger isn’t showing there. However, it does show in the actor viewport, but there I can’t tell the OnEvent trigger if the widget button is pressed or not. Was that understandable? I’m fairly new to UE4, but have a good understanding of the terminologies.

I would probably go about doing this by creating a UMG menu, create buttons for each room you want to teleport too, and then add a Widget Interaction Component to your motion controller. For event trigger or whatever you want to press buttons with, do Press Pointer or Simulate Pointer (something with Pointer) off the Widget Interaction component and do Left Mouse Button. This will let you click on widgets using the motion controller interaction component.

For the button press, get player pawn, set position to X. Where X is the location of a room or whatever. You might want to set some target points up to use for this.

Also, you want to move the location of the player pawn, not the player controller.

To make the menu appear in front of the player, I’d set it up in the pawn - add a widget component, that is your TeleportationMenuWidget. Position it so it’s attached to the motion controller and visible when you look at it. YOu’ll both have to scale it down a lot, and set the draw size to be larger (by default it’s 500x500 when widgets are 1080p by default).

Then set a button to toggle the visibility of the teleportation menu widget.

Thanks! I like what I’m reading. I’m testing this.

The widget is showing nicely now.
I’ve added this to the motioncontroller blueprint, but I’m still not sure how to hover the buttons.

In the Widget Interaction Component, you need it to be attached to your Motion Controller, then turn Show Debug on, so you can see what you’re looking at. Beyond that, it should just work to point and click buttons now in 3D worldspace widgets.

Also, you can’t use the same widget interaction component on two motion controllers. You need a separate one for each (or just one in one hand)

Thanks for your help. I’m still struggling. The menu shows. I had to invert the buttons to get them the right way, but it’s there. That’s a good thing. However, the menu will not toggle on/off, even if I have the code in there. It just spawns with the motioncontroller, also even if I put EventOnEndViewTarget connected to the Set Hidden in Game node.

I need to elaborate on my method, because I altered it a little from what you said. I have the teleportationMenuWidget in the motioncontroller, and the widgetInteraction with the debug on the pawn. This way, the line moves with the HMD and the menu moves with the motioncontroller. I found this more intuitive than the other way around.
teleportmenu3.PNG

It turns off if I manually tick off Hidden in Game directly in the teleportationMenuWidget. So why doesn’t the blueprint work?
Here’s the blueprint.
(

Additionally, Get Player Pawn node is available in the pawn blueprint and level blueprint. That’s not really where I need it.
The onReleased node is only available in the widget blueprint. So I’m kind of missing how to combine these across blueprints.
A logical way for my brain would be (and start from there):
teleportmenu3.PNG

But that is obviously not possible.

You can then do a “SetActorLocation” node by dragging a wire out of the blue “GetPlayerPawn”'s pin.

But the onReleased node in that image has a fake white line which I painted in to show what would be logical. It’s not able to connect these two. So then I wonder, in the widget blueprint, how to get a teleport function from the button action? It’s possible to connect it better in the pawn, but there I don’t have the button onReleased trigger ready. And in the Widget, the teleport node isn’t available. It should have just been a teleport node with ability to select an object to teleport. But no.

Maybe you know of a method of getting the button onReleased trigger accessible in the Pawn blueprint?