I’m trying detect the land before the player in 2d game so that it can alert. Ray should be front and downside so that player can see the land. How can I make the direction this way? Any ideas?
Yes, Type Raycast in the Scripting Reference and you will find how to do exactly that. Cast a ray down before an object hits the floor.