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
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.