I have a simple code written in Processing 3.x that I am using to test out the collision detection for a cave/maze.
If you where to run said code, you'd see that I have the code so that it detects collisions on the x-axis (top of the rectangle) and y-axis (left side of the rectangle), and correctly prevents the movement of the "player" from moving out of the rectangle, but I cannot seem to find a solution for preventing the movement out of the bottom or the right side of the rectangle, even though I am able to detect the collision. Every solution I try seems to lock the "player" to those respective sides. Any suggestions?
Thanks in advance.