I got my first tiny app up and running, it grabs the left stick position from each of the controllers and positions a ball onscreen based on where the stick is being held.
I'm surprised at the "chunkiness" of the values I'm getting back from getAxisValue() - rather than smooth analog values between -1.0 and 1.0, I'm getting ~32 discrete values in that range. Moreover, when I try to sweep out the extents that the stick can reach, I notice a big "notch" when I get to a multiple of 45 degrees - that is, if I hold the stick to the right, the X,Y values I get are (1.0, 0.0), as I expect, and as I move it counter-clockwise, I get values that are close to a radius 1.0 circle, until I get to right and up, when the X,Y values are (0.5, -0.5), which is noticeably short of the unit circle. This effect is observable on each of the four quadrants.
Is this a known behavior of the hardware? Or is there a "stick resolution" mode that I need to set up to increase the smoothness of the values I get back?
I can imagine some games could specify a dead zone and then normalize the values to the unit circle, but then we're dealing with just another D-pad.
Comments
-=Hicsy=-
PM me Facebook
Founder of ReachingPerfection.com
I havent spent much time with your code, but the 'notchy' feeling seems to be coming from the fact that ur code is dividing the polling data into 32 parts.
like here: com.bigdicegames.core : ControllerSample : update()
I think that combined with the ODK standard dead-zone-shift (compensation?) is causing the jumps - it's also apparent in the ouya-controller-testapp sdf
Ill pickup a case of beer tomorrow and try to nut it out but it seems to be just bad math in the ODK.
also i'm too tired to do the math right now, but it cuts between 87%-100% (rounded off) and 0%-13% each quarter rotation so i think thats like... 74% movement. In theory without an (incorrectly coded) deadzone you should therefor still have smooth movement if you only push the stick 74% in any direction; obviously therefore the correct deadzone-shift would then extend those results (and anything above that) to 100%, then add deadzone numbers to the BASE (not the top) of the movement calculation...
-=Hicsy=-
PM me Facebook