- Home /
Best way to handle 2.5d punch attack?
I'm just trying to figure out the best way to go about making a punch attack in a 2.5d game (so it only needs to punch left or right). I can get to the point where pressing Fire1 would perform an action but do not know what I should do next.
Answer by Statement · May 09, 2012 at 12:29 AM
You could use a kinematic collider/trigger, linecast or overlapsphere for example to figure out which object you hit relative to your position.
You could use sendmessage to alert objects they been punched so they could respond to the punch.
To make the character do an animation, use animation.Play.
To play a sound, use audio.Play.
Your answer
Follow this Question
Related Questions
Weapon attack 0 Answers
I'm still having Trouble with this AI script 2 Answers
Zombie Alien Mellee Attack 1 Answer
melee attack with raycast 0 Answers
Ai Zombie Melee Attack script. 5 Answers