I already know the problem, but I don't know how to fix it.
So I have code, like this:
1 2 3 4 5 6 7 8 9
| for (int i = 0; i < units.size(); i++) { Unit temp = units.get(i); for (int i2 = 0; i2 < blocks.size(); i2++) { if (temp.collisionCheck(temp2)) temp.setFalling(false); else (!temp.collisionCheck(temp2)) temp.setFalling(true); } } |
And if the player collides with a block, it would stop falling, and vice versa.
But, since it checks with each block,
it would be true that it collided with one block, but since it didn't collide with the rest,
it would start falling again.
It's very hard for me to solve this problem,
could somebody help?

If you need more source code, I'll provide a link.
And this is not the same problem as the "Rectangle.intersects" problem I had.
