added location correction when colliding with the edge so you always appear exactly on the edge