Simple-WebXR-Unity icon indicating copy to clipboard operation
Simple-WebXR-Unity copied to clipboard

How to enable teleportation?

Open medinags opened this issue 2 years ago • 5 comments

Hello, Thank you for this very useful package. I am new to WebGL, but I have some experience with MRTK. I am trying to use teleportation in the Oculus browser. But I can't get it to work. In MixedRealityToolkit it is active.

image

Do I have to do something else to activate it? Merci!

medinags avatar Feb 21 '22 22:02 medinags

SimpleWebXR inputs support teleportation.

https://github.com/Rufus31415/Simple-WebXR-Unity/blob/f00c57aa2241d464e6d151afcf3347266beb03fc/SimpleWebXR-Demo/Assets/SimpleWebXR/Scripts/MRTK/SimpleWebXRController.cs#L29

https://github.com/Rufus31415/Simple-WebXR-Unity/blob/7b37e75ede96f70f4f16bb968c1b487c889ba782/SimpleWebXR-Demo/Assets/SimpleWebXR/Scripts/MRTK/SimpleWebXRHand.cs#L43

But it seems to me that you have to select a teleportation compatible pointer

Rufus31415 avatar Feb 23 '22 05:02 Rufus31415

Hello, Thank you for replying In inputs I have the SimpleWebXR profile image And I have this as a Pointer image Do I have to select another one?

medinags avatar Feb 23 '22 08:02 medinags

OK, everything seems ok, if you find what's going on, can you tell me ?

Rufus31415 avatar Feb 23 '22 09:02 Rufus31415

I'm testing the scene MRTK-HandInteraction

There is a script called "OculusQuestThumstickHandler.cs". That is supposed to execute the teleportation, but what it does is to move the player.

https://github.com/Rufus31415/Simple-WebXR-Unity/blob/7b37e75ede96f70f4f16bb968c1b487c889ba782/SimpleWebXR-Demo/Assets/SimpleWebXR/Examples/Scripts/MRTK-HandInteraction/OculusQuestThumstickHandler.cs#L28

Another thing, did you test the teleportation in this scene, or should it be added from a new script?

medinags avatar Feb 23 '22 09:02 medinags

Yes this is just a workaround to move the player. But it doesn't use MRTK teleport feature.

Yes I tested teleportation, but I don't think there are any examples online that show this

Rufus31415 avatar Feb 23 '22 13:02 Rufus31415