Python Forum
Problem with collision detection...
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Problem with collision detection...
#2
Your condition
if wall.rect.x==self.rect.x + dx and wall.rect.y == self.rect.y + dy:
seems never to be True.
Are you sure to test for equality? Maybe you need to test for being within a range?
Without more code it´s difficult to help, it´s just guessing.
Reply


Messages In This Thread
RE: Problem with collision detection... - by ThomasL - Nov-12-2019, 06:19 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
Question [PyGame] Problem with collision of player and enemy Nekotrooper 1 758 Dec-08-2023, 03:29 PM
Last Post: deanhystad
  can't get collision detection to work in platform game chairmanme0wme0w 10 3,973 Aug-19-2022, 03:51 PM
Last Post: deanhystad
  [PyGame] Collision in not happening onizuka 3 3,471 Sep-07-2020, 11:30 AM
Last Post: metulburr
  [PyGame] No collision detection onizuka 6 3,743 Aug-18-2020, 01:29 PM
Last Post: onizuka
  Arcade Collision Problem randor 0 2,716 Oct-28-2019, 11:17 PM
Last Post: randor
  Multiple wall collision in pacman rustyjoe 4 4,178 Aug-11-2019, 08:08 AM
Last Post: rustyjoe
  drawing, moving, and collision problems (pygame) SheeppOSU 26 15,064 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