Closed jorgeolothar closed 2 years ago
This can also be recreated with the latest Tilia Farm project, without the use of SteamVR, so this issue might need to moved.
Steps to reproduce
Current behavior Near zero float values seem to not register correctly, causing pointers to not disappear, and movement axes to keep moving when joystick is at rest, and triggers to not reset.
just to confirm, you can only recreate when building for quest? you cannot recreate in the editor?
I think this issue is still part of the Tilia.Input.UnityInputSystem package and the sample mappings don't actually contain a better deadzone value and the callback to context for vector2 and vector3 also need a deadzone setting
Also, the existing float deadzone fix needs updating too i think
return value >= DeadZoneValue ? value : 0f;
only matters if the float value is a positive value.
If the value is negative but not 0, then it will fail to return any value at all.
the DeadZoneValue for now can be a positive and negative bound instead of having a separate deadzone for positive and negative approaches to zero.
so:
return Math.Abs(value) >= Math.Abs(DeadZoneValue) ? value : 0f;
This should assure the value is always checked against the positive version of the value against the positive version of the deadzone, but the actual value even if negative will still be returned.
I can recreate in the editor with the Quest acting as an Oculus Rift PC
It seems that in fact the Unity Input System has its own built in mechanism for handling axis deadzones using the Processors.
I'll look to just use that instead of adding any custom stuff, that makes more sense I think
I can recreate in the editor with the Quest acting as an Oculus Rift PC
I cannot recreate at all in the unity editor, works fine every time for me. but built for quest i can recreate it.
Ok I think I know the issue.
The Vector2 Context callback (and the float one as well) have the context to process set to Performed
This should mean that when the input context is performed then the value is passed to the zinnia action.
But it seems that the input context doesn't register as performed on the quest when you quickly let go of the control (e.g. release the thumbstick for it to snap back to the center)
in this instance it does register a Canceled
context though.
So my proposal for the fix is to just make sure that on axis values (vector and float) the Callback Context -> Context To Process
is just set to Everything
This will mean the value is registered upon it first being touched, then registered for every subsequent performed
and will also register on the final Canceled
.
It may mean that the Value Changed
event on the zinnia action could report the same value 3 times for the same frame. I think I'll just chance that and see if anyone finds that to be an issue first.
This PR https://github.com/ExtendRealityLtd/Tilia.Input.UnityInputSystem/pull/20 should fix the issue, it will need to be updated in the farm scene too
:tada: This issue has been resolved in version 1.1.11 :tada:
The release is available on:
Your semantic-release bot :package::rocket:
Environment
Steps to reproduce
Tilia.SDK.SteamVR.Unity
and SteamVR package from Unity Asset StoreUnityXRPluginFramework
withCameraRigs.SteamVR
in the farm sceneExpected behavior
Teleport pointer appears when thumbstick is off center, disappears when thumbstick is released to neutral.
Current behavior
Teleport pointer appears, but very often will fail to disappear as if the axis 2D coordinates were not zero. This is also true to other 1D axis actions like grabbing (index controller) and trigger axis.
I believe this is related to providing a deadzone value for float as per this fix in
Tilia.Input.UnityInputSystem
. Not sure if it belongs there since it only occurs when usingTilia.SDK.SteamVR.Unity