I’m new to the XR Interaction Toolkit and trying to understand how all the pieces work together.
I see in the “XRI Default Input Actions” that there are input actions for “Teleport Select”, “Teleport Mode Activate”, and “Teleport Mode Cancel”, but when I go look at the Teleportation Provider, Teleportation Anchor, and Teleportation Area behaviors, they just seem to be working off of select and activate.
What are those input actions for, and how are they intended to be used?
I was trying to do something that seemed like it should be fairly simple: teleport when pulling the trigger on my Quest controller instead of the grip button. But I’m not seeing a way to do that with the provided teleportation behaviors. I can make it so that it will teleport with the trigger if I’m already holding down the grip button, but I don’t see a way to just be able to point at a location, pull the trigger, and teleport there without coding up my own teleportation system. It seems like scenarios like this would be exactly why abstracting the input actions out would be helpful – I would swap out a reference to an Input Action to change what triggers it, or change the definition of that “Teleport Select” input action – but there doesn’t seem to be a way to do either.
…which makes me wonder if I’m missing something about this system.
For your situation look out for the part where he discusses “Input Helpers” to access the controller buttons/triggers. Once you see how he uses them to activate or deactivate the teleport rays, you should be able to apply the same logic.
Valem sticks with a Device Based input system. If you want an Action based input system, go to Justin P Barnett on YouTube.
Those input actions that you named are used with the Controller Manager behaviors that are on each hand in the XR Interaction Toolkit Examples VR project. They are used to switch between different XR Ray Interactors, where one is set up for normal distance grabbing, and one is set up for teleportation. I would recommend you take a look at that project for an example setup of implementing the locomotion setup you are describing.
Maybe I can resurrect this thread as I have a related (if not identical) question. I have teleportation working in a VR game per a tutorial. Teleport Mode Activate is set to Primary2DAxis and it is activated by pushing “north” on the joystick. I would rather it operated by pushing the “B” (secondaryAction) button. For the life of me I cannot find a way to change the action accordingly. None of the dropdowns seems to have an option for the secondaryAction button. Pointers are appreciated but I’ve watched many videos and scanned through examples. I haven’t found it.
Click the Teleport Mode Activate action and change it from a Value Vector 2 type of action to a Button action type. Then click on the binding and click the Path to change it to secondaryButton. Since that secondaryButton control is a ButtonControl and not a Vector2Control like the Primary2DAxis control, it would be filtered out of the path window since the type is incompatible in the previous type. Finally remove the Sector interaction from the binding by clicking the - button since that’s only for the thumbstick binding.
That will make the teleport ray active when you press the secondary button, but you still need to change the Teleport Select action if you want to make it teleport when you release the secondary button. Repeat the same steps above for the Teleport Select action. Then as long as your Teleportation Area or Teleportation Anchor component has Teleport Trigger set to On Select Exited, it will trigger the teleport when you release the secondary button. You could use a different binding instead of secondaryButton for Teleport Select if you want to make it happen on a different button press from just activating the teleport mode.
Hi, I’m having the same issue you had before, with the interactions remapping. Did you reload the settings somehow ? Even if I change the settings in the XRI Default Input Actions, the changes are not taken into account, the Teleportation is still activated with the Grip Button.
– Edit :
I actually found where the problem was. In my Teleport Ray Object, I didn’t change the XR Controller (Action-based) Component. The Input Select Action was still using the default settings, instead of the Locomotion settings.
If anyone has the same issues, this video was very useful to me :