deactivate teleport?

Hi does anyone knows how to deactivate the teleportfunction. I would like to deactivate the teleport in certain areas, but i tried many things, but none of them work :slight_smile:

Do you mean to exclude an area so you cannot teleport to it? Then you can simply use a Nav Modifier to block some areas.

If you mean to modify the teleport function so it doesn’t work from within certain areas, I guess you can set a flag as you enter the area and use a Branch just after the teleport event. Then you can reset the flag as you leave the area.

The only problem is if teleport is your only way of moving around then you will be stuck inside the no-teleport area forever… :wink:


ah great, thats a good one. i will have to use the second one. But not in a triggerbox but with a button. I wont be stuck. I use it for my game where i made a drone and a remote control. And i steer the drone (and camera) with the same controller, so now i am teleporting at the same time as controlling the drone. Which is a bit weird :slight_smile:
An other weird thing is that the facebutton 3 doesnt work. Probably because that would have a been a backwards teleport. But assigning this button to a different event wont work. probabaly i have to find this deactivation sequence in the same place where you want me to put the branch. Let search right now, i will let you know :slight_smile:

Oeh man, i am not very good at this i am afraid. And it looks so simple, can anyone see the mistake i make? I made branch, if the condition is true the teleport works. If its untrue you cannot teleport. And in the levelBP i casted to that pawn variable and set this variable to untrue (and with a delay after 20 seconds its true again). But it doesnt work :slight_smile:

So what happens exactly? Does it always teleport or never teleport?

Hey thanks for the reply. Well what happends is nothing at all. But in de pawncontroller bp the variable works. If i check it to untrue as default then the teleporting is disabled. But somehow i can not set the variable in the levelbp to get it working. As you can see it does cast to the pawncontroller to get the set-variable. I tried to check it, uncheck it. And change the default check in the pawncontroller. It seems to logical to work, but it appears i do something not logical somewhere :slight_smile:

Ok, I am confused by your logic in the VR Pawn. You seem to turn off all the setup of the motion controllers etc. rather than just disable the teleportation. You are setting and reading the same variable in Begin Play Events under the assumption that the level Begin Play terminates before the pawn Begin Play starts.

I would move the logic to disable the teleport somewhere else in your pawn. For example when the button to initiate the teleport is pressed, so even if it is pressed, nothing happens anyway.

Aha, okay thanks! So i will have to find another place to put that branch in the pawncontrollerbp. But the setting of that variable in the levelbp is not good the way i did it? Or will it solve when i het the right spot in the pawnbp? First thing in the morning

It’s fine like you did in the Level Blueprint. On the other hand, you don’t really need it. Set that variable to default to false in the Pawn and it will be false whenever you start playing.

yes yes yes, thanks man, it worked indeed! i have put the branch after the input action of the controllers and it works fine :slight_smile: