I am using XR Interaction toolkit sample scene for 2.2.0. Scene has a lever where it enables Continuous or Teleport functionality based on the position. I am trying to find where and how it enables Continous or Teleport in the script, i couldn’t find anywhere.
Anyone can help ? XRLever script only sets lever movement.

Hi @kondayampalli ,
There is a script called LocomotionSetup that references all the controls on that table. It’s added/configured on the Game Object: XRI_Examples > 1 - Setup > Locomotion Settings in the hierarchy. This script acts much like a UI controller in that it takes events from the individual controls and pipes them to the LocomotionManager where all of the real changes happen. In that script, you will find a function called [ConnectControlEvents](https://github.com/Unity-Technologies/XR-Interaction-Toolkit-Examples/blob/main/Assets/XRI_Examples/Setup/Scripts/LocomotionSetup.cs#L172), where we add listeners for onLeverActivate and onLeverDeactivate for each of the controls and the associated function calls which turn on and off the specific locomotion controls via the Locomotion Manager and the ActionBasedControllerManager, which is an included sample asset. This is in charge of swapping the Input Actions based on the particular context of locomotion or interaction.
Hopefully that helps track down how that chain of events occurs. You could also tie directly to the Activate/Deactivate events on the switch in your own project if you are looking to use it for such a thing.
I really appreciate your response. I been struggling to understand where it set teleport or continuous, i looked each component of XR Lever and scripts i couldn’t figure it out. Thank you for responding. I see it now.
