Skip to main content
Finally found the correct solution.
Source Link
Tashus
  • 421
  • 3
  • 13

Setting the axis to inverted causes the returned values to behave in a sensible way. Now if I tilthad previously discovered a workaround that gave me reasonable behavior but did not reveal the stick up, I get values from -0.1 to -0underlying problem.99 and -1 when the stick is at maximum, and I get values from 0.1 to 0.99have revisited the project and 1 when I tilthave determined the stick downroot cause. I can just as easily write my script expecting an inverted axis, so this allows me to continue

Two axes were named "Horizontal".

It seems that the InputManager by default has two axes named "Horizontal" and two axes named "Vertical. Unfortunately" I still don't know what is causingDeleting one of the odd behavior whensets completely solved the axis isn't invertedissue..


The previous solution:

Setting the axis to inverted causes the returned values to behave in a sensible way. Now if I tilt the stick up, I get values from -0.1 to -0.99 and -1 when the stick is at maximum, and I get values from 0.1 to 0.99 and 1 when I tilt the stick down. I can just as easily write my script expecting an inverted axis, so this allows me to continue. Unfortunately I still don't know what is causing the odd behavior when the axis isn't inverted.

Setting the axis to inverted causes the returned values to behave in a sensible way. Now if I tilt the stick up, I get values from -0.1 to -0.99 and -1 when the stick is at maximum, and I get values from 0.1 to 0.99 and 1 when I tilt the stick down. I can just as easily write my script expecting an inverted axis, so this allows me to continue. Unfortunately I still don't know what is causing the odd behavior when the axis isn't inverted.

I had previously discovered a workaround that gave me reasonable behavior but did not reveal the underlying problem. I have revisited the project and have determined the root cause.

Two axes were named "Horizontal".

It seems that the InputManager by default has two axes named "Horizontal" and two axes named "Vertical." Deleting one of the sets completely solved the issue.


The previous solution:

Setting the axis to inverted causes the returned values to behave in a sensible way. Now if I tilt the stick up, I get values from -0.1 to -0.99 and -1 when the stick is at maximum, and I get values from 0.1 to 0.99 and 1 when I tilt the stick down. I can just as easily write my script expecting an inverted axis, so this allows me to continue. Unfortunately I still don't know what is causing the odd behavior when the axis isn't inverted.

added 55 characters in body
Source Link
Tashus
  • 421
  • 3
  • 13

Setting the axis to inverted causes the returned values to behave in a sensible way. For example, nowSetting the axis to inverted causes the returned values to behave in a sensible way. Now if I tilt the stick up, I get values from -0.1 to -0.99 and -1 when the stick is at maximum, and I get values from 0.1 to 0.99 and 1 when I tilt the stick down. I can just as easily write my script expecting an inverted axis, so this allows me to continue. Unfortunately I still don't know what is causing the odd behavior when the axis isn't invertedI still don't know what is causing the odd behavior when the axis isn't inverted.

Setting the axis to inverted causes the returned values to behave in a sensible way. For example, now if I tilt the stick up, I get values from -0.1 to -0.99 and -1 when the stick is at maximum. I can just as easily write my script expecting an inverted axis, so this allows me to continue. Unfortunately I still don't know what is causing the odd behavior when the axis isn't inverted.

Setting the axis to inverted causes the returned values to behave in a sensible way. Now if I tilt the stick up, I get values from -0.1 to -0.99 and -1 when the stick is at maximum, and I get values from 0.1 to 0.99 and 1 when I tilt the stick down. I can just as easily write my script expecting an inverted axis, so this allows me to continue. Unfortunately I still don't know what is causing the odd behavior when the axis isn't inverted.

Source Link
Tashus
  • 421
  • 3
  • 13

Setting the axis to inverted causes the returned values to behave in a sensible way. For example, now if I tilt the stick up, I get values from -0.1 to -0.99 and -1 when the stick is at maximum. I can just as easily write my script expecting an inverted axis, so this allows me to continue. Unfortunately I still don't know what is causing the odd behavior when the axis isn't inverted.