Added raycasting to determine the normal of the surface being collided with