In my game, there is a cat that jumps on pillars. When it lands on a pillar, force is applied and it jumps. There are three animation states which are just single image. The states are : idle,up and down.
When cat lands on the pillar, Collision is triggered where i set animation state to idle. Then, force is added and animation state is changed to up. But problem is, this collision and add force happens so fast, the cat switches between down and up without showing idle.
To overcome this, i added an empty child object to pillar. Then added Edge collider set as trigger. This child was placed slightly above the pillar. So when cat hit this, animation state would switch to idle. Then the cat would land on pillar and jump.
This worked except, the trigger is two way. When cat jumps from pillar, it collides with this trigger and state is changed from up to idle. I tried to add platform effector with one way, but the effector cannot be used on a trigger.
So, is there a way i can add a collider to the empty child which will let it go through aftyer setting state to idle?