14 AnswersNew Answer
I really can’t help, but maybe this code of mine is helpful? It also handles collisions on 4 sides of a block... https://code.sololearn.com/WM2x10n1vy1A/?ref=app
marjel101 Does the variable "x0" and "yO" reference the square on your code?
marjel101 Interesting, I tried p5.collide2D with InvBoy's Node.js library but I couldn't find anything like that on GitHub. I wonder if there is an alternative for collideRectRect() which checks sides and widths of the object?
marjel101 Thanks for the reply. I don't understand collision in the code at all, but thanks anyway. I have asked Coder to see if he can help.
Concept: have the platforms break up into 4 lines and detect collisions with the point edges of the box Implementing this takes a bit of time (for me to test) Source: http://www.jeffreythompson.org/collision-detection/line-point.php
Coder It's probably an easy solve Again. But I can't get the top collision to respond again https://code.sololearn.com/WjuHV2FIB48r/?ref=app
Coder The character can't jump when it hits the top of the platform. Also, when I did debugging using the console, I found out that top and bottom are reversed.