Python Forum
[PyGame] Problem with collision of player and enemy
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[PyGame] Problem with collision of player and enemy
#2
Your images are much larger than the painted part of the image. Crop the image to remove as much surround empty space as possible and your results will be better.

If you still don't like the collision detection, treat your images as circles and compute the distance between centers.
Reply


Messages In This Thread
RE: Problem with collision of player and enemy - by deanhystad - Dec-08-2023, 03:29 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  [PyGame] platformer enemy animation Yegor123 3 2,112 May-03-2023, 08:42 AM
Last Post: Windspar
  can't get collision detection to work in platform game chairmanme0wme0w 10 4,004 Aug-19-2022, 03:51 PM
Last Post: deanhystad
  How to make enemy chase me in pygame? Jan_97 3 4,563 Nov-23-2021, 05:08 PM
Last Post: Jan_97
  [PyGame] Collision in not happening onizuka 3 3,482 Sep-07-2020, 11:30 AM
Last Post: metulburr
  [PyGame] No collision detection onizuka 6 3,755 Aug-18-2020, 01:29 PM
Last Post: onizuka
  [PyGame] pygame, help with making a function to detect collision between player and enemy. Kris1996 3 3,419 Mar-07-2020, 12:32 PM
Last Post: Kris1996
  Problem with collision detection... michael1789 4 3,366 Nov-12-2019, 07:49 PM
Last Post: michael1789
  Arcade Collision Problem randor 0 2,725 Oct-28-2019, 11:17 PM
Last Post: randor
  Multiple wall collision in pacman rustyjoe 4 4,195 Aug-11-2019, 08:08 AM
Last Post: rustyjoe
  drawing, moving, and collision problems (pygame) SheeppOSU 26 15,093 Apr-22-2019, 03:09 AM
Last Post: SheeppOSU

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020