Hi.
use the 'Direct Link'
Then click on the image button (above the text window on the left side)
and paste your link :
[img]https://i.imgur.com/QywjEql.png[/img]
Are you using animator for animation?
I can only see the state switching but not the actions are used.
Hi, thanks for the tip inserting the image!
I actually add an "Animator Play" action in the attacking state. So when the 4th frame of the attack animation is played, it should trigger the event "Attack Hit Check" event, and then enter the state "Player Hit Check" with a ray cast 2D action, checking if the enemy hits the player.
If it's true, deals damage; if it's false, enter the reset state.
This is basically the logic of how an enemy attacks. Am I correct?
So the issue is, the animation after 4th frame will not be played properly when the ray cast 2D is true.
Or, is there any other alternative way? I am willing to give it a try! Thank you.