XRTK / com.xrtk.core

The Official Mixed Reality Framework for Unity
https://xrtk.io
MIT License
309 stars 34 forks source link

Oculus applies "deadzone" for Single and Dual Axis inputs, should XRTK? #232

Closed SimonDarksideJ closed 4 years ago

SimonDarksideJ commented 5 years ago

XRTK - Mixed Reality Toolkit Feature Request

Is your feature request related to a problem? Please describe

As part of the Oculus API, Deadzones are applied to axis data to allow for a "Dead Zone". This is set to a fixed variable in Oculus, but should be configurable.

 if (shouldApplyDeadzone)
   AxisValue = OculusApi.CalculateDeadzone(singleAxisValue, OculusApi.AXIS_DEADZONE_THRESHOLD);

Should the XRTK also provide Dead Zone capabilities for Axis inputs?

How would you classify your suggestion

Describe the solution you'd like

Ideally, Axis controls should by default provide Dead Zone capabilities, setting:

Also, should the dead zone settings also be publically accessible, to allow for use in projects and give players the ability to configure?

StephenHodgson commented 5 years ago

Likely so, but I'm unsure where to expose this configurable property.

StephenHodgson commented 5 years ago

I'm also interested in making this into a curve so we can get in depth customization.

StephenHodgson commented 5 years ago

I think this is somewhat related to #111 and #258

SimonDarksideJ commented 5 years ago

Oculus provides a custom property for setting a deadzone, above and beyond the Unity Input deadzone settings (given it doesn't use unity input). This is applied at the device layer to decide whether an input change is beyond a certain range. So this would some before Input Actions and the like.

If we add this kind of capability, we should have a generic way of configuring this.

StephenHodgson commented 5 years ago

Yup that's the plan 🙂

SimonDarksideJ commented 5 years ago

In fact, I would go so far as to state the areas where we use unity input, those deadzones should be set to zero in favour of this configuration.

So it's not directly related to #111 as this would take effect BEFORE the event / action would be raised.

StephenHodgson commented 5 years ago

I'd really like to break any usages of the old unity input system as soon as possible.

But essentially this is getting wrapped up into an ActionTrigger where users can specify all the conditions to trigger this action.

SimonDarksideJ commented 5 years ago

Lets set up a dedicated Discord channel for discussing the input actions change, especially this ActionTrigger you mention