Reputation: 82
I'm using a PS5 Dualsense controller with my computer to make a simple macro keyboard, and I used a tutorial where JOYHATMOTION and JOYBALLMOTION were used. I have been experimenting with my controller, and I can't seem to find what JOYHATMOTION and JOYBALLMOTION are used for. I was wondering if anyone used the event types and knew further about this.
Upvotes: 0
Views: 557
Reputation: 55
I don't really know what both JOYHATMOTION
and JOYBALLMOTION
are, but from my reading from the pygame docs it seems to me that the pygame.joystick.Joystick()
function returns 5 events JOYAXISMOTION JOYBALLMOTION JOYBUTTONDOWN JOYBUTTONUP JOYHATMOTION
including JOYBALLMOTION AND JOYHATMOTION
which i can guess are movement values generated when moving the hat of the joystick, read more about it in the pygame docs
Upvotes: 1