1
Vote

Infinite Loop on Squeeze Between Sprite and Map Edge

description

The pushback for sprite collisions with the map edge is directly away from the map edge.
The pushback for sprite collisions with another sprite is the reversal of the intersecting movement.
When these conflict it results in just pushing back and forth in an endless loop.
The if-else structure resolves priority for each in turn but they get into a situation where they alternate.

comments