ZiarayZ / First-PyGame

My first project in PyGame, a simple 2D platformer.
0 stars 0 forks source link

Collisions #15

Open ZiarayZ opened 2 years ago

ZiarayZ commented 2 years ago

Collision detection is all separated into separate instances.

As such, when a Blocker hits the Player and moves that Player into a Wall, there is no check for that collision. When the Player moves, it THEN recognises the Player-Wall collision and can teleport the Player through Walls. This can only cause the Player to teleport beneath the Wall, or to the other side of the Wall.

ZiarayZ commented 2 years ago

Fixes have been made in commit: f8600ebc7c7358bf992c83816c8bb425f424730e As well as some possible improvements Cloning of Player and Blocker to be seen when moving through "portals" as well for realistic transfer. Due to this change it's expected that Blockers CANNOT carry Player through to the other side, as one teleports before the other.