Gamepad.RawAxis returning -1 to 1 (not -100 to 100)

Bugs will be moved here once resolved.

Post » Sun Mar 02, 2014 12:36 am

Problem Description
Microsoft XBox360 Gamepad.RawAxis(Gamepad, 0 or 1) returns in the range -1 to 1 whereas the manual states -100 to 100. The Gamepad.Axis returns correctly.

Attach a Capx
https://dl.dropboxusercontent.com/u/184657779/C2%20problems/gamepad%20axis%20raw%20value.capx

Description of Capx
This capx displays on screen the values from Gamepad.RawAxis and Gamepad.Axis for comparison.

Steps to Reproduce Bug
  • Step 1. Run capx in Chrome, press a button on XBox gamepad to register it.
  • Step 2. Make a full deflection input in x or y direction on analog input control.
  • Step 3. Observe the Textbox indications of RawAxis and Axis values for analog input 0 and 1.

Observed Result
The RawAxis values range from -1 to 1 and the Axis values range from -100 to 100.

Image

Expected Result
The manual states that the RawAxis values should range from -100 to 100.

Affected Browsers
  • Chrome: (YES)
  • FireFox: (NO - gamepad controller not recognised)
  • Internet Explorer: (NO - gamepad controller not recognised)

Operating System and Service Pack
W7 x64 SP1

Construct 2 Version ID
r163. I tried it on r146 with the same result.
A big fan of JavaScript.
B
76
S
20
G
74
Posts: 2,251
Reputation: 46,476

Post » Wed Mar 12, 2014 7:04 pm

The manual is wrong in this case, so I've updated the manual. -1 is the correct "raw" value; it's the plugin that multiplies it by 100 when returning the value with the non-raw expression.
Scirra Founder
B
399
S
236
G
89
Posts: 24,528
Reputation: 195,388

Post » Wed Mar 12, 2014 11:40 pm

Thanks @Ashley!
A big fan of JavaScript.
B
76
S
20
G
74
Posts: 2,251
Reputation: 46,476


Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 7 guests