Lets say I have a 2D Character with a sword. Lets say we press “spacebar” and the player object plays the “swingSword” animation. How would I detect a hit?
The only thing I can think of is, when the player presses “spacebar” I make a variable true that runs an OnTriggerEnter one time, and if another object triggers the player, we have a hit.
Is there any better way to do this?