Dec-30-2021, 10:11 PM
(This post was last modified: Dec-30-2021, 10:11 PM by BashBedlam.)
I just commented out these lines of code which seem to be redundant and now it works as I might expect it to. Let me know if you agree.
Edit:
Nope, sorry. Now it penetrates from the other direction
Edit:
Nope, sorry. Now it penetrates from the other direction
for block in block_hit_list: if self.change_x > 0: self.rect.left = block.rect.right else: self.rect.right = block.rect.left ''' if self.change_x < 0: self.rect.right = block.rect.left else: self.rect.left = block.rect.right '''