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 FinKone · Jun 30, 2013 at 09:08 PM · triggerwaypointsavoidance

Waypoints, avoidance, and general advice.

Ok so I'm going to start learning more about arrays (I know what they are for, I just have limited exposure to them) and I decided to do this using a waypoint system for AI.

I've got a general idea of how I want to attack this problem. I'm going to add waypoints using a array, then use a few raycasters for avoidance detection. Plan is if a ray fires off in relation to a player, stop current path, make adjustments to the right or left using another ray to the right or left, pass - once passed, move back to the same rough position past the player, pick up the last waypoint and start back towards it from the new current position...

Thing is I see a lot of people say "avoidance - without ray casters" so is this idea a taxing one? What about if I used some type of trigger instead to tell the AI to ignore the waypoint and to move left or right, pass, then when another trigger is hit, return to waypoint path (storing how far left or right the AI moved and then going back on the same, but opposite angle until lined up with the waypoint again)?

Just really looking for ideas and general advice for someone thats stepping into AI and waypoints so I don't make some critical mistakes. Either way its still just a learning experience I'm after on this one.

Thanks guys.

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

1 Reply

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

Answer by sparkzbarca · Jun 30, 2013 at 09:23 PM

look up A* pathfinding explained for a general idea of how a list (a kind of array really) is used in pathfinding. A* is a very popular standard method of pathfinding.

arrays aren't hard to understand though.

Arrays are a whole lot of one type of object and you can access each one of them in succession, they are all the same type of thing with different values and they are stored together for convenience.

you could make an inventory system instead (pathfinding is actually quite difficult)

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 FinKone · Jun 30, 2013 at 09:49 PM 0
Share

I guess the main question was really more so in relation to not being to taxing if I was say. . Using 60 or so objects that all where using this raycasting waypoint method with avoidance.

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

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

Related Questions

Navmesh Agent avoidance with as triggers 1 Answer

Can't click gameobject when over another trigger? 1 Answer

OnTrigger ignoring all collisions but the first 1 Answer

Contact Triggered Waypoint 1 Answer

transform.collider.isTrigger problem 2 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