Skip to main content
2 of 2
replaced http://gamedev.stackexchange.com/ with https://gamedev.stackexchange.com/

Check out my answer: Platformer collision problems (C++)

Maybe it doesn't seem so simple to implement with your codes but that collision system would be the best choice for you (I think).