How to check the collision of a square with a wall?
compare x and y of a square with x and y of a wallAnonymous
Check whether the segment on which the square fell is active (black). If active, then collided.Anonymous
To place the code, please use CodePen or similar tool. Thanks you!