Can't make the player attack an enemy
Hello, i'm new to unity and i've an issue - i can't make player actually attack an enemy. I have an object, which is attack trigger that suppose to collide with an enemy and so deal damage, but what happens is the player moves away from the enemy when attack trigger appears. So there's the question - how do i make colliders actually collide with each other?
I guess the sword's BoxCollider2D is not trigger,and when you attack the enemy,the enemy pushes the sword away ,if you are using OnTriggerEnter2D ,at least one of Collider2Ds should be trigger, if you want them to collide with eachother you should use OnCollisonEnter2D, you didnot provide any information so we just have to guess :)
Your answer
Follow this Question
Related Questions
Tilemap Collider problems 0 Answers
Applying a script to two objects not working 2 Answers
2D collision not working 0 Answers
Attack/Kill Difficulties 0 Answers
Collisions not working in top-down RPG? 0 Answers