• Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
1
Question by oliver-jones · Nov 15, 2010 at 04:31 PM · ai

Help With Artificial Intelligence (AI)

I have no idea where to start with AI, just wondering if any of you have a source or a forum in which will help me, or give me example scripts of AI.

The AI in my game is basically a cube, that follows 3 waypoints set in a triangle and when I set close to the cube, it 'detects me' and begins to follow me whilst activating a 'kill player' function (which doesn't do anything at the moment).

But, for example how would I tell my AI to avoid obstacles whilst following me ... lets just say that my cube has 'zombie' features:

It moves aimlessly (check).

It sees player, and follows (check).

When zombie is close enough, it will harm player (check, well just activated a kill function).

Zombie to avoid obstacles (to do).

Another thing is that my AI gets confused when I am a higher level than my zombie (cube), it doesn't use stairs. It just gets as close to me as possible on its current ground level. This is obversely the case as I need to write some AI code to tell it to go up stairs when player is on higher level.

Any help, suggestions, or whatever

Sure would appreciate it.

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

2 Replies

· Add your reply
  • Sort: 
avatar image
2
Best Answer

Answer by StephanK · Nov 15, 2010 at 04:55 PM

You could take a look at unitySteer + Behave. Both are available on the new asset store for free.

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image oliver-jones · Nov 15, 2010 at 06:42 PM 0
Share

Okay, thanks. I'll take a look at that, if anyone else has any other idea or suggestions?

avatar image
1
Best Answer

Answer by TowerOfBricks · Nov 15, 2010 at 07:50 PM

To avoid obstacles you would have to use pathfinding.

There are three projects on the web for that (that I know of):

Path - A good pathfinding library for use with navmeshes, I don't think it works above 2.6 though.

The A* Pathfinding Project - An advanced pathfinding project which would probably work for your idea, it has some small issues with U3 though, an update will be released in a few days.

Waypoint Master - A quite simple pathfinding library, but might work for you, I don't know if it works with U3, though.

Good Luck!

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

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

Welcome to Unity Answers

If you’re new to Unity Answers, please check our User Guide to help you navigate through our website and refer to our FAQ for more information.

Before posting, make sure to check out our Knowledge Base for commonly asked Unity questions.

Check our Moderator Guidelines if you’re a new moderator and want to work together in an effort to improve Unity Answers and support our users.

Follow this Question

Answers Answers and Comments

1 Person is following this question.

avatar image

Related Questions

Hey I need an AI script for a character noticing nearby characters! 2 Answers

How to make an enemy backpedal? 1 Answer

Enemy AI Range Detection 3 Answers

How to make it so enemies only move towards the player when the player is colliding with an object 1 Answer

Problem With Enemy AI 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges