Sword swinging in unity 2d
I have a sword animation and not a separate sword child object . Now how can I check for collision between the player and the enemies
Answer by ASPePeX · Jan 31, 2017 at 01:49 PM
Depending on how complex you need to go ...
You could just check the distance to enemies and count them as hit when they are too close during a swing.
You could place a trigger collider roughly where the sword is and activate it during the swing.
You could use a small collider and animate its position during the swing, following the path of the sword.
Your answer
![](https://koobas.hobune.stream/wayback/20220612105938im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
2d platformer. character does not get destroyed on contact with spike collider 0 Answers
[Normal Map on 2D Graphics] I NEED HELP! 0 Answers
How to make player run forward automatically 2D? 0 Answers
Apply Custom Physics Shape from one spritesheet to another 1 Answer
Need Help Getting Basic Mechanics Started (2D Puzzle Platformer) 0 Answers