Before updating to Windows 10 you may need to return your Pro license. More information here

How do I make animal AI

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.

more ▼

asked Jan 05, 2013 at 12:51 AM

avatar image

28 13 11 14

(comments are locked)
10|3000 characters needed characters left

1 answer: sort voted first

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.

more ▼

answered Jan 05, 2013 at 01:04 AM

avatar image

32.4k 78 89 161

(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments



asked: Jan 05, 2013 at 12:51 AM

Seen: 4786 times

Last Updated: Jan 05, 2013 at 01:04 AM