cancel
Showing results for 
Search instead for 
Did you mean: 

Interaction SDK Teleport change trigger mapping.

JakeUpfront
Explorer

I am trying to change the controller mapping for Teleport using Meta Interaction SDK Locomotion. I can see its set in Joystick Axis 2D Active State in the Selector and TeleportActiveState. But I would like to use buttons 2 and 4 to trigger Teleport. I used OVRButtonActiveState instead of the Axis2DActiveState scripts. But the Arc don't render. Has someone been able to change the teleport button to something else? Having it in the joystick creates a lot of undesired teleport actions and users are complaining a lot about it.

1 ACCEPTED SOLUTION

Accepted Solutions

Big_Flex
Meta Employee

Hi @JakeUpfront, I work on the Interaction SDK team, so you can tag me in any future posts about Interaction SDK 🙂

For Teleport, the joystick is used in 3 parts: for entering locomotion mode (seeing the Arc), for canceling without selecting (moving the joystick sideways), and for selecting (moving the joystick to 0). Here are the steps you should follow to  change the trigger mapping.

1. To change which button lets you enter locomotion, under Hierarchy, select the Activate GameObject.

2. Under Inspector, disable the Axis 2D Active State component.

3. Add an OVR Button Active State component.

4. Set its Button to the button that should trigger locomotion.

4. In the Active State Selector component, set Activate State to the OVR Button Active State component you added in the previous step. 

Step 1Step 1

Image 1. Replacing the Axis Active State with the button you want to use. 

5. Since there's no way to cancel (other than selecting the void or something), in the Deactivate GameObject, disable the Active State Group and Axis 2D Active State components.

6. In the Active State Selector component, set Active State to the Interactor Active State component, since that component deactivates automatically after a selection.

Step 2Step 2

Image 2. Setting the Active State selector to just the Interactor Active State component instead of the original Active State Group.

7. Under Hierarchy, select the Selector GameObject.

8. Under Inspector, disable the Axis 2D Active State component.

9. Add an OVR Button Active State component and set its Button

10. Add an Active State Not component. We use a "not" here because we want the active state to trigger when the button is released.

11. Set its Active State to the OVR Button Active State component you just added.

12. In the Active State Selector component, set Active State to the Active State Not component.

Step 3Step 3

Image 3. Setting the Active State Selector to a button that will trigger when it's released.

View solution in original post

4 REPLIES 4

MetaDevXR
Protege

Good question.  I haven't gotten that far yet in my exploration / testing of the new all in one SDK but will have to eventually and would like to know this answer also and if there is an easy way to change the mapping.  I did some light investigating when implementing teleportation expecting to find a script where I could change the input mapping but only found the ActiveState script you mentioned.  I got teleporting working, but I also have a PlayerController that uses the right stick for rotation so there's potential for accidentally teleporting instead of rotating if the player is not careful moving the stick.   I currently suspect I will need to break down however Meta is doing the input and write my own input script manually with code.

Big_Flex
Meta Employee

Hi @JakeUpfront, I work on the Interaction SDK team, so you can tag me in any future posts about Interaction SDK 🙂

For Teleport, the joystick is used in 3 parts: for entering locomotion mode (seeing the Arc), for canceling without selecting (moving the joystick sideways), and for selecting (moving the joystick to 0). Here are the steps you should follow to  change the trigger mapping.

1. To change which button lets you enter locomotion, under Hierarchy, select the Activate GameObject.

2. Under Inspector, disable the Axis 2D Active State component.

3. Add an OVR Button Active State component.

4. Set its Button to the button that should trigger locomotion.

4. In the Active State Selector component, set Activate State to the OVR Button Active State component you added in the previous step. 

Step 1Step 1

Image 1. Replacing the Axis Active State with the button you want to use. 

5. Since there's no way to cancel (other than selecting the void or something), in the Deactivate GameObject, disable the Active State Group and Axis 2D Active State components.

6. In the Active State Selector component, set Active State to the Interactor Active State component, since that component deactivates automatically after a selection.

Step 2Step 2

Image 2. Setting the Active State selector to just the Interactor Active State component instead of the original Active State Group.

7. Under Hierarchy, select the Selector GameObject.

8. Under Inspector, disable the Axis 2D Active State component.

9. Add an OVR Button Active State component and set its Button

10. Add an Active State Not component. We use a "not" here because we want the active state to trigger when the button is released.

11. Set its Active State to the OVR Button Active State component you just added.

12. In the Active State Selector component, set Active State to the Active State Not component.

Step 3Step 3

Image 3. Setting the Active State Selector to a button that will trigger when it's released.

Thank you so much for your help Big_Flex. I had been struggling with it for a few days and from what I see I was just missing the ActiveStateNot component. You have no idea how much I appreciate your help. I love what you guys are doing with the Interaction SDK and XR in general. I am away travelling today, but tomorrow I will implement it following your valuable guidance.

THANK YOU!

Thank you for the detailed explanation, it really helps.