HTC Vive VRTK Teleport snapping?

Hi guys!

I’ve been playing with VRTK and I have everything working almost the way I want it to for a simple virtual tour. I’m wondering if there’s any way to snap the teleport ark onto an object when it gets close to it. I’ve gone through most of the example files and the only thing relating to snapping is object snapping which is not what I’m looking for.

An example for what I’m trying to do is basically to have circular disks that indicate a new level will load when you teleport into that disk (Very similar to the sample files for the interaction system with SteamVR) I don’t necessarily need it to animate, but rather lock in the teleport ark when it gets close to the circular spot. I already have my triggers set up to load the new level when the player teleports into the disk, I’d just like it to lock the ark when it gets close.

I’m totally lost with where to even begin looking to get this to work so any ideas are more than welcome.

I did try grabbing the SteamVR teleport model and looking at the code. I found a line of code in the “Teleport Point.cs” script that might be referencing the Player on line 84 but I have no idea if it is or how to change it to recognize the VRTK Player instead of the Valve VR Player

    void Start()
        {
            player = Player.instance;
        }

Like I said any ideas on where to start would be greatly appreciated!

VRTK has code for destination points. You can either attach that script, VRTK_Destination_Pont I believe it is called, or you can inherit from it and override the functions you wish to modify.

From memory, take a look at example 44, camerarig restricted teleport zones I think it is called.

Thank you so much for the reply!

I took a look at scene 44 shortly after I posted here. Nothing jumps out at me for being able to snap the teleport arc to a certain point when the arc enters the destination point, but I was able to get the different “Looks” for inactive and active destination points working and snapping the player position to the center of the destination object is working nicely

My project is working a lot better after adding the destination script although I would personally like to be able to snap the arc to the center of the destination point.