- Home /
Mecanim shooting
I have three animations. All i do in one model with blender.
Walking Take gun up Shooting
How i can now put that my mecanim AI player walking walking walking and when it see me it takes gun up and then shoot? I try found in youtube some tutorial but not found. Only those if player itself press something it do something.
Answer by DerTeufel · Jun 24, 2013 at 08:28 PM
It's the same way! Put a script to your AI gameObject. Check if the Player is in range. If he is in range, play only the "attack" animation or set a time variable to play these animation once and switch to the walk animation again. All scripts you put to a player, you can put to a gameobject. (Without the players control). Split your animations in the properties applied to you model importet in unity(Animations tab)
Your answer
Follow this Question
Related Questions
Reload Ammo is not working 1 Answer
Player cannot shoot 2 Answers
Need help... Start Button no longer working!!!!! 0 Answers
Unity freezes on play when I left click. 2 Answers