SteamVR

SteamVR

SteamVR Workshop
Customize your SteamVR experience by finding new backgrounds, 3D environments, controllers and base station models.
Learn More
C0DES 21 Nov, 2019 @ 2:26am
Blocking controller teleport function
Hey peeps!
I'm trying to make a tunnel with a locked gate obstruction, which players can see through the bars and even pass the controllers between them, but cannot use the teleport function while the player is on this side of the gate, atleast until the gate is unlocked.
Anyone know if you could just put a brush there with particular material on it?
I tried a nodraw brush but didn't have any effect.

Cheers!

< >
Showing 1-3 of 3 comments
Rectus 13 21 Nov, 2019 @ 8:06am 
If you want to do it in Hammer, the only reliable way I can think of is to use teleport meshes and disable the mesh behind the gate. People with large playspaces can just walk through.

The other option is writng a script, although that's very limited and tricky to integrate into the map. The player class has a AllowTeleportFromHand function that lets you disable the teleport from each hand. Note that some of the tools players can spawn will also use this function, so the teleport will reenable once they drop the tool.
Praxeos1 4 21 Nov, 2019 @ 3:44pm 
What about a large box trigger behind the gate that would call a function to set the player's position to a point in front of the gate? That way, the player couldn't even walk through without being automatically teleported back. Unlocking the gate would disable the trigger. You could use Rectus's player teleporter function from this guide.

https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=756119531
C0DES 22 Nov, 2019 @ 10:44pm 
Thanks so much for the info, I'll give those a shot and report back
< >
Showing 1-3 of 3 comments
Per page: 1530 50