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
Share
Go down
avatar
{SUPER MEMBER}-LV.4
{SUPER MEMBER}-LV.4
Posts : 64
Points : 1858
Rep : 3
Join date : 2013-12-21
Age : 15
Location : USA
View user profilehttp://oneknifegames.weebly.com/

AI Movement

on Sat Mar 21, 2015 6:02 pm
Message reputation : 45% (11 votes)
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
Member [Lv. 0]
Member [Lv. 0]
Posts : 1
Points : 1199
Rep : 0
Join date : 2015-04-11
View user profile

Re: AI Movement

on Sat Apr 11, 2015 5:04 pm
where is the download link
avatar
Admin
Admin
Posts : 608
Points : 3170
Rep : 406
Join date : 2013-12-11
Age : 21
View user profilehttps://www.youtube.com/user/misterninjaboy

Re: AI Movement

on Sun Apr 12, 2015 1:06 am
Message reputation : 100% (2 votes)
Nonpor6379 wrote:where is the download link
Its a step by step tutorial, what's there to download?
Member [Lv. 0]
Member [Lv. 0]
Posts : 1
Points : 1106
Rep : 0
Join date : 2015-07-13
View user profile

Re: AI Movement

on Mon Jul 13, 2015 6:53 am
DUH!!!!!
Member [Lv. 3]
Member [Lv. 3]
Posts : 15
Points : 1440
Rep : 1
Join date : 2014-10-03
View user profile

Re: AI Movement

on Mon Jul 27, 2015 3:22 pm
TO make it die by gunshot, you do an onCollision right?
Member [Lv. 3]
Member [Lv. 3]
Posts : 15
Points : 1440
Rep : 1
Join date : 2014-10-03
View user profile

Re: AI Movement

on Mon Jul 27, 2015 3:56 pm
Does this work in Unity 5?
Member [Lv. 1]
Member [Lv. 1]
Posts : 2
Points : 784
Rep : 0
Join date : 2016-06-02
View user profile

Re: AI Movement

on Thu Jun 02, 2016 1:31 pm
Interesting thanks for this
Guest
Guest

Re: AI Movement

on Mon Jul 25, 2016 4:10 am
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!
Guest
Guest

Re: AI Movement

on Mon Jul 25, 2016 4:11 am
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.
Back to top
Permissions in this forum:
You cannot reply to topics in this forum