ValveSoftware / steamvr_unreal_plugin

SteamVR Input Unreal Plugin - Documentation at: https://github.com/ValveSoftware/steamvr_unreal_plugin/wiki Sample project (UE4.15-4.23): https://github.com/ValveSoftware/steamvr_unreal_plugin/wiki/sample/SteamVRInputPlugin.zip Sample Project (UE.424+): https://github.com/ValveSoftware/steamvr_unreal_plugin/wiki/sample/SteamVRInputPlugin_UEIntegrated.7z

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

UE 4.26 | MoveLeft_X also fires MoveRight_X Event

WaGi-Coding opened this issue · comments

Hello, i've downloaded the testlevel content for from thge SteamVR integrated link.

Now i tried to do simple movement & snap turn. I wanted to use the left Valve Index Thumbstick for movement & the right Thumbsticks X axis for snap turn.

The problem is that the MoveLeft_X (left thumbsticks X axis event) also raises the MoveRight_X event. So when i want to move right/left, it will also snap turn, for no real reason.

I've tried to rename the input mappings to MoveLeft_X to ThumbLeft_X and so on and tried to unbind the right thumbstick via steamvr but the left x axis keeps firing left & right x axis events.
image
image
image

I am not sure if this is a 4.26 only problem or only happens with index knuckles. Somebody has similar problems or and/or even knows whats wrong here and how to fix that? I am suffering from that ^^ I expected it to be a bit easier to start with

Greetings

Hi @WaGi-Coding - For thumbsticks, they need to be converted to Vector2 actions. As UE doesn't have native support for Vector2 in the input ui we auto-convert thumbstick X&Y axis mappings to a "joystick"/vector input using the following rules:

#107 (comment)

You should see a demo of this in the test project:
image

With axis mappings, they do get fired every frame, so what you might be seeing are inputs being triggered with zero-axis values.

One way of implementing SnapTurn can be:

image

You can then figure out if the player wishes to snap turn Left vs Right by reading the Axis value from the Joystick Vector2 input (e.g. Less than 0 is Left, Greater than 1 is Right)

Let me know if that helps.

Cheers,
Rune

An important thing to note is that your players can rebind input, so you need to account for this in your code.

Something like this should work (similar concept for Movement Input):
image

Hi, thanks, but thats exactly what i already did. However, it turned out the "Cosmos" Bindings were causing it.

Only the Left Cosmos thumbstick was used for MoveLeft_X and MoveRight_X. However, i can't replace it with the correct cosmos side, as i can't find any cosmos binding at all. So i had to entirely remove cosmos bindings.

So i just removed Cosmos Bindings and it now works as expected with the index controllers. I don't really understand that but well, at least it works now ^^ No ideal way tho as i now ignore cosmos users

//Edit: after regenerating action manifest, i can find cosmos bindings again. But why did it used cosmos bindings when using index knuckles in first place?

InputAxis always triggers per frame but with 0 axis values, so the sample I sent uses a key mapping instead of relying on axis mappings and a manual treshold.

But glad you got you're project working, so all's well I guess :)