Skip to main content
replaced http://gamedev.stackexchange.com/ with https://gamedev.stackexchange.com/
Source Link
Notice removed Draw attention by Rafael Almeida
Bounty Ended with ChrisUC's answer chosen by Rafael Almeida
Tweeted twitter.com/StackGameDev/status/700299102521786368
Removed answer
Source Link

Found the problem, I just changed previousBottom < tileBounds.Top to previousBottom <= tileBounds.Top. Explanation:

In the tests the previousBottom was with the value of 126 and the tile top with the value of 128, so previousBottom < tileBounds.Top was true and player was pushed out. In the next update, the player bottom is equals as the tile top, so previousBottom = 128 and tileBounds.Top = 128, the condition is false, and the player pass through the platform.

Found the problem, I just changed previousBottom < tileBounds.Top to previousBottom <= tileBounds.Top. Explanation:

In the tests the previousBottom was with the value of 126 and the tile top with the value of 128, so previousBottom < tileBounds.Top was true and player was pushed out. In the next update, the player bottom is equals as the tile top, so previousBottom = 128 and tileBounds.Top = 128, the condition is false, and the player pass through the platform.

Resolution
Source Link

Found the problem, I just changed previousBottom < tileBounds.Top to previousBottom <= tileBounds.Top. Explanation:

In the tests the previousBottom was with the value of 126 and the tile top with the value of 128, so previousBottom < tileBounds.Top was true and player was pushed out. In the next update, the player bottom is equals as the tile top, so previousBottom = 128 and tileBounds.Top = 128, the condition is false, and the player pass through the platform.

Found the problem, I just changed previousBottom < tileBounds.Top to previousBottom <= tileBounds.Top. Explanation:

In the tests the previousBottom was with the value of 126 and the tile top with the value of 128, so previousBottom < tileBounds.Top was true and player was pushed out. In the next update, the player bottom is equals as the tile top, so previousBottom = 128 and tileBounds.Top = 128, the condition is false, and the player pass through the platform.

Update the question, remove the unnecessary content
Source Link
Loading
Notice added Draw attention by Rafael Almeida
Bounty Started worth 50 reputation by Rafael Almeida
edited tags, more explanation
Source Link
Loading
Source Link
Loading