Howdy, I would like to possibly know how to make animals. I would like to model up a sheep or a cow or a chicken etc. and put them into my game as animals that walk around. I don't want them to do much, maybe just walk around. Nothing really else. I would also like to eventually be able to kill them with my axe I modeled today.
Right now the axe has one script and that is that when I mouse click it plays my swing animation I made. That's it and later on I would like to be able to kill them. I don't have an idea for this game, I'm just testing my skills.
Overview: Want to be able to have animals that don't do anything, just walking around, and relax. I also want to be able to kill them with both melee and firing weapons. I really only want to know how to make these guys just move around and sit there. I can do the killing thing later on because my world is kind of lonely. I'm using Blender btw.
Answer by fafase
Jan 05, 2013 at 01:04 AM
you can look there http://unitygems.com/basic-ai-character/ the beginning shows how to give basics moves to a NPC. That can be applied to an animal. You could then add a running away condition when shot/axed at and get:
Vector3 dir = (player.position-transform.position).normalized * -1;
as a moving vector opposite the player position.
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.
To help users navigate the site we have posted a user guide.
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).
Answers and Comments
9 People are following this question.
blender .fbx model animations not working
Importing animation from Blender using a lattice modifier.
Disabling scaling in unity animations?