简体   繁体   中英

Pygame rotation

I'm implementing scorched earth in python 3.4 using pygame. My problem is that I don't know how to effectively implement barrel so that I can easily rotate it. I already tried using rect and image but I can't rotate any of them. Is there a better way or I should just try with image or rect?

You can rotate images using pygame.transform.rotate . I suggest using a cache for the various degrees you need.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM