raycast sometimes did not hit the terrain