Hi!
I have asked about this before, but I ask again! And I hope I will solve it this time with some help!
This is a 2D platformer. My problem is when the player is falling down from a platform edge. I want the player to change to falling animation. I tried with a trigger on the player. And tag the platforms ground or something. The problem here, is when the player falls down from the platform and hit the side of the platform which has the tag ground, it will check the player as grounded.
I think the best way is to use Raycast, so I created two empty game objects for the Raycast. One for left side and one for right side. But it's problems here also.
One of the things I've tried, is to have two FSM for the Raycast. Left side and right side. And then I disable the left Raycast FSM when I'm walking to the right. And the same the other way. The problem is when the player is close to the edge and I turn the player, then I enable the disabled FSM and the player will be checked as falling.
So this was not good. I've also tried to have two Raycast for left and right side on the same FSM. It didn't work so good either.
Can someone help me to find the best solution?
Thanks!
