Fix collision detection direction bugs
and adjust algorithm for checking is character is on solid ground