How to check which object my character is colliding with?
问题 I am working on collision detection for a game, so that if the character runs into an object they stop moving. As part of my solution for this, I have made two functions that iterate through a list of on screen objects to check for collision. The first function (on_key_up) checks for collision when the direction key is held down and then stops character movement when True. The second part of this is another function (on_key_up) that moves the character slightly out of the collision zone so he