Skip to content Skip to sidebar Skip to footer

How To Flip Image After Hitting Wall

I want the image to face right when travelling right and face left when travelling left. I'm not sure what to do here... This is for an assignment and flipping the image isn't nece

Solution 1:

See pygame.transform.flip():

flip(Surface, xbool, ybool) -> Surface

This can flip a Surface either vertically, horizontally, or both.

pygame.transform.flip() flips creates a new Surface from the source Surface which is flipped. e.g:

my_flipped_image = pygame.transform.flip(my_image, True, False); 

Post a Comment for "How To Flip Image After Hitting Wall"