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)
Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.
The best place to ask and answer questions about development with Unity.
If you are a new user, check out our FAQ for more information.
If you are a moderator, see our Moderator Guidelines page.
We are making improvements to UA, see the list of changes.
For troubleshooting common problems with Unity 5.x Editor (including Win 10).
To help users post good questions and use the site effectively we have posted a user guide. Please check it out.
Answers and Comments
17 People are following this question.
fps shooting enemy
Issue with Bullet Movement shooting
Space Skybox implementation
Projectile Firing/Gun script
Shooting script problem.