Skip to main content

004. Unity3d Tutorial - Enemy AI 2/2

See video

In this tutorial, we will finish up the start of our enemy ai script. By the end of this video, we will have an enemy that is capable of finding the player, turning towards them, and then moving towards them.

Tags:

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Offline
Joined: Feb 5 2011

I'm having this odd issue with the code. It seem like the myTransform var isn't working and im not sure y. I Downloaded the first ten scripts and the codes working but just not the transform. and im using unity 3. If someone can help it would be very helpful thanks.

Offline
Joined: Sep 16 2011

im getting this error:

NullReferenceException EnemyAI.Start(at assets/Scripts/EnemyAI.cs:19)

Please help as quick as you can I have downloaded the free scripts and have put them in and i am still getting this problem. :(

Offline
Joined: Apr 2 2012

im not sure as to why as I double checked the code and made no alterations however my cubie starts moving under the plane while following the Player object.

Offline
Joined: Mar 19 2012

Thanks!

If you jump he loses gravity.. anyway to make him move only on the X?