File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -106,11 +106,13 @@ def setRot(self, rot):
106106 image_rect = self .sprite .get_rect (topleft = (self .rect .x - self .target .costumes [self .target .currentCostume ].rotationCenterX , self .rect .y - self .target .costumes [self .target .currentCostume ].rotationCenterX ))
107107 #offset_center_to_pivot = pygame.math.Vector2((self.rect.x, self.rect.y)) - image_rect.center
108108 offset_center_to_pivot = pygame .math .Vector2 ((134 , 36 ))
109- print (offset_center_to_pivot )
110109 rotated_offset = offset_center_to_pivot .rotate (90 - self .direction )
111110 rotated_image_center = (self .rect .x - rotated_offset .x , self .rect .y - rotated_offset .y )
111+ print (rotated_image_center )
112+
112113
113114 self .image = pygame .transform .rotate (self .sprite , 90 - self .direction )
115+ # FIXME
114116 self .rect = self .image .get_rect (center = rotated_image_center )
115117 self .setXy (self .x , self .y )
116118
You can’t perform that action at this time.
0 commit comments