Tweaked collision checking to prevent getting stuck on ground. Fixed
raytracing behaviour when pitch=90.