Python Forum
[PyGame] Rotating image issue
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[PyGame] Rotating image issue
#6
Rotate an image in a circle.
1. Store center point.
2. Rotate from original image.
3. Get image new rect.
4. Set rect.center with store center.

Also improve code.
1. Refactor Hero class. Its handling too much.
2. Learn to use pygame rects and vector2.
3. Your math can be made simpler. math.radians(angle) over angle * math.pi / 180
99 percent of computer problems exists between chair and keyboard.
Reply


Messages In This Thread
Rotating image issue - by Evoluxman - Oct-11-2019, 07:07 PM
RE: Rotating image issue - by metulburr - Oct-11-2019, 09:52 PM
RE: Rotating image issue - by Evoluxman - Oct-11-2019, 09:54 PM
RE: Rotating image issue - by metulburr - Oct-11-2019, 09:58 PM
RE: Rotating image issue - by Evoluxman - Oct-11-2019, 10:06 PM
RE: Rotating image issue - by Windspar - Oct-11-2019, 10:45 PM
RE: Rotating image issue - by Evoluxman - Oct-12-2019, 08:10 AM
RE: Rotating image issue - by Windspar - Oct-12-2019, 11:58 AM
RE: Rotating image issue - by Evoluxman - Oct-12-2019, 12:54 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Rotating a rectangle CompleteNewb 19 13,930 Aug-28-2021, 03:23 PM
Last Post: CompleteNewb

Forum Jump:

User Panel Messages

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