OpenVR Teleport problem

Vicente Rosell

New member
In Demo scene from VR Add-on I can not use Teleport ability if start with OpenVR in Virtual Reality SDKs.
I have got an Oculus Rift and the problem is that ability Teleport start correctly when I press Axis button, but ability never stop. So I can not teleport.
If I use Oculus in Virtual Reality SDKs all works correctly.

2020-05-25 23_24_20-Clipboard.jpg
 

Justin

Administrator
Staff member
This sounds like it is some type of a button mapping issue. If you create a new script and check the input of the axis button does it return to zero?

Debug.Log(Input.GetAxis(buttonName));
 

Vicente Rosell

New member
Hi,

In OpenVR.

When I start press button "Right Vertical Movement" this is log:

1590513860641.png

And when I stop press button this is the log:

1590513939925.png

Indicator arrow is showing always. You can move direction and length of indicator but teleport doesn't work because ability doesn't finish.

I hope this help you.

Thanks
 

Vicente Rosell

New member
Hi,

I have tried again but in Oculus SDK and when I stop press button this is the log:

1590517267934.png

It looks like value is decreasing slowly until 0, so in this case teleport ability is working perfectly.
 

Justin

Administrator
Staff member
Thanks - that may help. If you change TrajectoryMove.Start to always set m_MoveOnZeroInput to true does it work?
 

Vicente Rosell

New member
Hi,

Thanks for your answer: with this change Teleport ability works in OpenVR !

But now I have a another problem in teleport ability: when I press Axis button to start ability again after first teleport if finger point at a valid new location to teleport, "First Person Character" object move inmediately to this new location and teleport ability show the indicator to teleport again when you stop pressing Axis button. This is not a good work for user experience.

In Oculus SDK works correctly.

Can you help me with this new problem in OpenVR SDK?

Thanks again
 

Justin

Administrator
Staff member
I'm not completely following - as long as the axis input is not zero the trajectory arc will show. If you don't want instant teleportation you can use the dash ability.
 

Vicente Rosell

New member
Hi,

Excuse my last explanation, it's difficult to understand if you can not see it.

I have create a short video of 4 seconds where you can see:

First 2 seconds is teleporting correctly at start, in second 3 I point to location and press Axis button and instantly "First Person Character" object appear in that location.

I try it with Dash ability and same effect happens.

If you need more information please ask me.

Thanks
 

Justin

Administrator
Staff member
Thanks - that helps explain it. Just to verify, the Oculus headset works correctly, correct?

In terms of OpenVR, is the Right/Left Vertical Input axis value positive when the trajectory appears again?
 

Vicente Rosell

New member
My Oculus headset works correcly with Oculus SDK in XR Settings for teleporting.

I send you log for all Input Axis values for perform issue that was showing in the video of this thread for OpenVR. First teleport works correctly, the second moves instantly "First Person Character" object.

Thanks for your fast support.
 

Attachments

  • EditorUFPSVRAddon.zip
    3.3 KB · Views: 1

Justin

Administrator
Staff member
Thanks. It looks like there is some input values after the initial teleportation. These input values could be starting the ability. Can you verify that the ability is starting and stopping when there is an input value? You can do this by placing a Debug.Log within TrajectoryMove.AbilityStarted and TrajectoryMove.AbilityStopped.
 

Justin

Administrator
Staff member
Hmm, based off of that callstack it looks like the ability is starting properly. The ability starts when there is input, and it stops when there no longer is any input. So it sounds like the problem is that there is some input being reported but you don't actually have the joystick moved?
 

Vicente Rosell

New member
I see AbilityStarted, AbilityStoped and AbilityStarted in a few time in log file, Teleport ability start and stop (instant movement) and start again and in this case you can move indicador to next position.
 

Justin

Administrator
Staff member
I'm not completely following - which lines are you referring to? Based on that log it looks like the teleporter arc is only being activated when there is a input value.
 

Vicente Rosell

New member
Lines 430 - 487 : AbilityStarted, AbilityStoped, AbilityStarted.
In lines 430 - 452 : AbilityStarted - AbilityStoped, in this case "First Person Character" moves to location point by hand.
In lines 487 - AbilityStarted, teleporter arc is showing and you can move correctly when AbilityStoped in line 1047.
 

Justin

Administrator
Staff member
This sounds like it is an issue with m_MoveOnZeroInput . You changed that to true, correct? For the vive try changing it to false.
 

Vicente Rosell

New member
I changed the code to:
m_MoveOnZeroInput = VRInputTracker.GetDeviceName().Contains("vive") || UnityEngine.XR.XRSettings.loadedDeviceName=="OpenVR";

In this case is True for Vive or OpenVR, for solving problem with Oculus in this thread.

You say I have to put false for Vive?
 
Top