@@ -555,13 +555,7 @@ def width(self, new_value: float):
555555 if new_value != self ._width :
556556 self .clear_spatial_hashes ()
557557 self ._point_list_cache = None
558-
559- # If there is a hit box, rescale it to the new width
560- if self ._points :
561- scale = new_value / self ._width
562- old_points = self ._points
563- self ._points = [(point [0 ] * scale , point [1 ]) for point in old_points ]
564-
558+ self ._scale = new_value / self .texture .width , self ._scale [1 ]
565559 self ._width = new_value
566560 self .add_spatial_hashes ()
567561
@@ -579,13 +573,7 @@ def height(self, new_value: float):
579573 if new_value != self ._height :
580574 self .clear_spatial_hashes ()
581575 self ._point_list_cache = None
582-
583- # If there is a hit box, rescale it to the new width
584- if self ._points :
585- scale = new_value / self ._height
586- old_points = self ._points
587- self ._points = [(point [0 ], point [1 ] * scale ) for point in old_points ]
588-
576+ self ._scale = self ._scale [0 ], new_value / self .texture .height
589577 self ._height = new_value
590578 self .add_spatial_hashes ()
591579
@@ -612,7 +600,7 @@ def scale(self, new_value: float):
612600 self ._scale = new_value , new_value
613601 if self ._texture :
614602 self ._width = self ._texture .width * self ._scale [0 ]
615- self ._height = self ._texture .height * self ._scale [0 ]
603+ self ._height = self ._texture .height * self ._scale [1 ]
616604
617605 self .add_spatial_hashes ()
618606
@@ -1066,7 +1054,7 @@ def draw(self, *, filter=None, pixelated=None, blend_function=None) -> None:
10661054
10671055 self ._sprite_list .draw (filter = filter , pixelated = pixelated , blend_function = blend_function )
10681056
1069- def draw_hit_box (self , color : Color = BLACK , line_thickness : float = 1 ) -> None :
1057+ def draw_hit_box (self , color : Color = BLACK , line_thickness : float = 2.0 ) -> None :
10701058 """
10711059 Draw a sprite's hit-box.
10721060
0 commit comments