Unity Ninja Unity 3D Forum
To have exclusive access to all downloads, recourses and links within this forum, a free registered account is required. Just a heads up Wink

You are not connected. Please login or register

Unity Ninja Unity 3D Forum » FREE Project Downloads & Recources » Scripts » AI Movement

AI Movement

View previous topic View next topic Go down  Message [Page 1 of 1]

1 AI Movement on Sat Mar 21, 2015 6:02 pm

OneKnifeGames


{SUPER MEMBER}-LV.4
{SUPER MEMBER}-LV.4
THIS DOES NOT INVOLVE SCRIPTING, HOWEVER, I THOUGHT THIS WOULD BE THE BEST PLACE TO PUT IT.


I thought you guys would like to have a way to make an object move without using a script, here's what I came up with. Oh, and don't worry about the zombie, that's what I used this for. Also, you can change the variables in step 1, 5, 7, and 8, this is stuff that can be changed to fit your preferences, but do not change any other variables or else it won't work. 


1. Start by making a normal cube and change the "Y" scale to 2(for a normal zombie) change the name to Zombie or whatever you want

2. Add a rigid body to it.

3. Mark all three of the the check boxes in "freeze rotation" and change the mass to 0.5 or less. change the Drag to 10

4. Add the smooth look at script which can be found by searching for it under "Favorites -> All Scripts"  in the project view but only if you have chosen the character controller package which can be chosen when you start a new project.

5. Set the target to your player and set damping to what you want. (the higher number you choose the faster will the zombie rotate) .

6. Now add a constant force. Which can be found under Component -> Physics -> Constant Force (last on the page).

7. Set the relative Force "Z" to the speed you want to make the zombie walk at. 20 will be good for a fast zombie and 5 will be good for a slow zombie.

8. Make a prefab and add the zombie to it



Last edited by OneKnifeGames on Wed Apr 15, 2015 7:27 am; edited 1 time in total

View user profile http://oneknifegames.weebly.com/

2 Re: AI Movement on Sat Apr 11, 2015 5:04 pm

Nonpor6379


Member [Lv. 0]
Member [Lv. 0]
where is the download link

View user profile

3 Re: AI Movement on Sun Apr 12, 2015 1:06 am

Nonpor6379 wrote:where is the download link
Its a step by step tutorial, what's there to download?

View user profile http://www.youtube.com/user/misterninjaboy

4 Re: AI Movement on Mon Jul 13, 2015 6:53 am

Atmoloq


Member [Lv. 0]
Member [Lv. 0]
DUH!!!!!

View user profile

5 Re: AI Movement on Mon Jul 27, 2015 3:22 pm

GorumGamer


Member [Lv. 3]
Member [Lv. 3]
TO make it die by gunshot, you do an onCollision right?

View user profile

6 Re: AI Movement on Mon Jul 27, 2015 3:56 pm

GorumGamer


Member [Lv. 3]
Member [Lv. 3]
Does this work in Unity 5?

View user profile

7 Re: AI Movement on Thu Jun 02, 2016 1:31 pm

GrimIce


Member [Lv. 1]
Member [Lv. 1]
Interesting thanks for this

View user profile

8 Re: AI Movement on Mon Jul 25, 2016 4:10 am

TheRealTitanSmash


Member [Lv. 1]
Member [Lv. 1]
Hi Folks

But when I want to Spawn it into the scene it won't follow the Player. It just stays there and does nothing. How can I make that the Enemy chooses automaticly the Player?

Thx for the help!

View user profile

9 Re: AI Movement on Mon Jul 25, 2016 4:11 am

TheRealTitanSmash


Member [Lv. 1]
Member [Lv. 1]
GorumGamer wrote:Does this work in Unity 5?
Yeah, it works in unity 5. you just have to put the Script from the Standard Assets on to the Object.

View user profile

View previous topic View next topic Back to top  Message [Page 1 of 1]

Permissions in this forum:
You cannot reply to topics in this forum