I have tried to make a good gravity engine for a game but I have a problem with the collision detection. manly for testing if you're at the top of a block or if you're at a side of the block.
everything I have tried results in wall climbing or an error

