FragMate CommunityLog in

FragMate - Software and Game Developer Community, including Resources, Forums, Marketplace & More.

Share

descriptionAI Movement

more_horiz
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

_________________
-One Knife Games

descriptionRe: AI Movement

more_horiz
where is the download link

descriptionRe: AI Movement

more_horiz
[You must be registered and logged in to see this link.] wrote:
where is the download link

Its a step by step tutorial, what's there to download?

descriptionRe: AI Movement

more_horiz
DUH!!!!!

descriptionRe: AI Movement

more_horiz
TO make it die by gunshot, you do an onCollision right?

descriptionRe: AI Movement

more_horiz
Does this work in Unity 5?

descriptionRe: AI Movement

more_horiz
Interesting thanks for this

descriptionRe: AI Movement

more_horiz
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!

descriptionRe: AI Movement

more_horiz
@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.
Permissions in this forum:
You cannot reply to topics in this forum