- Home /
Make two game objects interact via animation JS
What I mean by the title is pretty much a counter system. Lets say I make one person throw a punch, then the punch would glow red for the right timing, how would i make it so when the other person presses a button the two characters play animations which show one counter punching and the other one getting hit.
If i make them just play the animation, they could be in the wrong spot so everything would look out of place, literally.
Answer by Veldars · Apr 02, 2015 at 12:40 PM
Sorry, I'm working in C#, I can give you code.
In Unity you can Add an Animation component on your GameObject, assign your punch annimation and then control it in script.
I know how to make an animation play when I press a button, but how would I make the other character react to the punch?
Your answer
![](https://koobas.hobune.stream/wayback/20220613191927im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Animator preventing correct spawn position? 1 Answer
How would you reccommend adding the jumping animation to my script? 0 Answers
How to get a animation to play without changing the pozition the gun is in when aming down sights 0 Answers
Texture Swap + Animated Offset/Tiling 1 Answer
Rotating An Object On Its Axis Once 3 Answers