I have a question about using the joystick as a cursor because I
intend to use it on the PSP.
The dilemma is that when the joystick is released, the cursor should
stop. However, it will continue at a slow speed in the direction it
was previously moving at. I figure this is becuase the joystick
position is only read after a joystick event and the previously read
event was ‘just’ before the joystick reached a neutral state.
When there is a joystick event, I’m recording the roll and yaw, using
that to create a cursor velocity, then updating the curosr position
What makes this interesting is that when the joystick is still, but
not in a neutral position, the cursor should still be moving.
But I can only think of one way to avoid this issue and that is:
- when there are no events, set the roll and pitch and therefore
velocity of the cursor to zero.
But this assumes that there is always some kind of event happening
while there is no joystick event and that there are no events at all
when the joystick is neutral.
Hence this idea is completely crap. Unusually though it is only 'up’
and ‘right’ that will keep slowly moving in the previous direction.
I’m stumped, cheers for any ideas.