Answer the question
In order to leave comments, you need to log in
How to make a sword strike in Unity 2D?
How to make the character hit the enemy when pressing a certain button in Unity.
Answer the question
In order to leave comments, you need to log in
Obviously, write code. Lots of code.
Start with input detection - found in any unity tutorial.
First you need animation, sprite or skeletal - depending on how the character is made. In the AnimationController, you need to allocate a separate state for this animation.
In the Update character script, we check if the button that is responsible for the sword strike is pressed, if so, we start the animation.
There should be enough keywords here to google the details.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question