This is for a 2D infinte runner - I asked a previous question, but thought about it some more and have come up with a fairly vague answer that I’m not too sure about. I have a player (see diagram) that when he jumps he might miss the obstacle and play his animation regardless (which is what I don’t want).
So what I was thinking - what if I had a raycast pointing toward his nearest obstacle, retrieving that angle (or mathematical function), and if it’s within a threshold of whatever angle I set it will play a specific animation. This way it might not play the animation if he will miss the obstacle. Is something like this possible? Or is there something easier?
Some additional info - player’s x and z values are frozen (he only jumps). Obstacles constantly fly at him.