- Home /
noob question about melee combat
If i create a trigger collider located at the sword of a character that has a damage script upon it will it work? is this generaly good to do? every tutorial i show only shows how to deal damage when the player is close enough but this looks a bit dull imo. How did games like skyrim do this? and how did games like god of war? does anyone have any clue?
Thats completely perfect in my opinion.. Only i would prefer to do is to apply the damage script on the enemy rather than the sword// because on sword in collision detection you have to get the component of hit object and all stuff.. whereas you can do it directly on enemy.. on OnTriggerEnter and check if it hits word trigger
Answer by poncho · Feb 26, 2014 at 02:24 PM
It is better to each enemy receive a feedback when they are being attacked, the same way the player "feels" when he is attacked, now the enemy would see which weapon was attacked with and act according with that, not sure how other games do it, but as object oriented programming tells, enemy is an object, weapon is an object, and a lose of health action is being landed on enemy so enemy should handle it. Good luck.
Your answer
Follow this Question
Related Questions
A Fighting Games Hit boxes 1 Answer
Hitting Multiple Enemies 1 Answer
OnTriggerEnter - Melee Combat 1 Answer
hold key unequip sword 0 Answers
How should i properly do sword combat? (Think: M&B/Oblivion/Skyrim) 3 Answers