Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • 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
0
Question by xXTURDLEXx · Nov 29, 2012 at 07:32 AM · javascriptaipathzombiefinding

Zombie A.I path finding help

HI, is there a way to make a zombie ai script ( Path finding ). I know that i'm asking for a lot, but if there are and tuts avialible please tell me about them. Also if u can tell me ho to get started with learning JavaScript, please tell me ( as i only know to very basics) . :)

Comment
Add comment · Show 1
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 whydoidoit · Nov 29, 2012 at 07:36 AM 0
Share

Ok well I just wrote a tutorial on pathfinding on Unity Gems - but it's in C# and believe me - it's not easy :)

UG is planning a simplified version of pathfinding and co-author Fafase is on that right now - but that also cannot really be beginner level.

You can get, for free, Aaron Grandberg's AStar Pathfinding Project - which will probably do what you want.

If you are beginning with AI then Unity Gems does have some very useful articles on how to get started.

2 Replies

· Add your reply
  • Sort: 
avatar image
-1

Answer by MonkeyChunx · Dec 02, 2012 at 10:26 PM

I GOT NUTHIN :(

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
avatar image
0

Answer by GameTech · Jan 05, 2013 at 01:14 PM

I am making my own pathfinding using very easy to understand algorithms, as a new programmer I can tell you it is easy but not optimised. It is easy on calculations imo though. It uses waypoin ts and charactercontroller to avoid obstacles. I suggest this way as using navmeshes and A* require some thinking and seems to hurt performance as they are more accurate. Having few points and setting them in a path array seems cost efficient.

Comment
Add comment · Show 3 · 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 Piflik · Jan 05, 2013 at 01:23 PM 0
Share

If you actually posted some information (example code or at least an explanation of what you're doing), this might even be an useful answer.

avatar image GameTech · Jan 06, 2013 at 08:20 AM 0
Share

As someone who is also learning javascript basics, my code is not very refined at all. So basically, way points = transforms that are connected to other transforms by array, the transforms next to each other in the array are in straight paths to each other. Just have the zombie ai use transform.LookAt(waypoint) and charactercontroller.move(transform.forward*(whatever your movespeed)*Time.deltaTime) to get to each transform. That allows the zombie to follow a path. If you want it to chase a player in a maze for example, you would iterate through the array and use Vector3.distance(waypoint,Player) to find the closest waypoint, have the iteration place the path into the path Transform Array for the zombie to follow.

Go through Unity javascript tutorials for complete projects. They might have some in the Asset store, there are some C# examples at least. I suggest learning javascript and then learn C#.

avatar image xXTURDLEXx · Jul 21, 2013 at 12:26 AM 0
Share

Thanks but I found Eteeski was very helpful with his tutorials and so I had a crack at them. Works alright but is a bit glitchy sometimes. Thanks though. :)

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.

Follow this Question

Answers Answers and Comments

13 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Need help with javascript AI 1 Answer

Attack Script problem please help 1 Answer

looking to make for a zombie script AI,navmesh or not? 2 Answers

How can I get an object to intercept a moving object's path? 3 Answers

zombie enemy AI 1 Answer


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