Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: Converting PyGame 2 axis joystick float to 360 angle
Post: RE: Converting PyGame 2 axis joystick float to 360...

Aha! About 2 hours after posting this, I found a solution online.
archieab Game Development 1 3,373 Sep-26-2018, 05:40 PM
    Thread: Converting PyGame 2 axis joystick float to 360 angle
Post: Converting PyGame 2 axis joystick float to 360 ang...

I would like to convert my joystick's two axis float (horizontal and vertical) to a 360 angle that can be used to set a players direction in my game. From my research, I've found the best route to tak...
archieab Game Development 1 3,373 Sep-25-2018, 06:18 PM
    Thread: Using joystick module from PyGame
Post: RE: Using joystick module from PyGame

I'm unsure on how to mark this post as solved, but I managed to work out a solution.
archieab Game Development 6 16,296 Sep-25-2018, 06:13 PM
    Thread: Using joystick module from PyGame
Post: RE: Using joystick module from PyGame

Something similar to this, for i in range( axes ): axis = joystick.get_axis( i ) textPrint.print(screen, "Axis {} value: {:>6.0f}".format(i, axis) ) if Joystick 2's Axis 3 is equal to ...
archieab Game Development 6 16,296 Sep-22-2018, 10:40 PM
    Thread: Using joystick module from PyGame
Post: RE: Using joystick module from PyGame

(Sep-22-2018, 08:16 PM)Larz60+ Wrote: not a pygame expert, but it appears that in the code: if event.type == pygame.JOYBUTTONDOWN: print("Joystick button pressed.") if event.type == ...
archieab Game Development 6 16,296 Sep-22-2018, 08:30 PM
    Thread: Using joystick module from PyGame
Post: Using joystick module from PyGame

Exact code with commenting can be found here, or here. while done==False: for event in pygame.event.get(): if event.type == pygame.QUIT: done=True if event.type == pygame.JOYBUTTONDO...
archieab Game Development 6 16,296 Sep-22-2018, 05:02 PM

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020