Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 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 /
  • Help Room /
avatar image
0
Question by PetomPixel · Jan 12, 2017 at 08:09 PM · script.pathfindingconnectionwaypoint system

Best Way To Setup a Waypoint-based Patrol System?

Throughout the past week, I've been experimenting with different systems of patrolling, each based off of simple waypoints (nodes) with no walls in between the ones meant to be traveled between for easy pathfinding (point him at the node and translate him forward). The problem arises when I want to connect nodes to each other. I've tried:

  • assigning them all by hand, giving each node a script with a public list that I then choose a size for and manually drag in each node the object can travel to from there but it was too tedious.

  • having an object parent to all the nodes linecast between every node and check for a wall, assigning a path between ones with no wall inbetween, but that method connected nodes when other nodes were inbetween them, not what I want.

  • having each node raycast and look for neighbor nodes within a radius of itself, but I realized I didn't want a length limit between nodes.

  • having the object raycast itself with a sight limit, but again, didn't want a limit

In the end, what I want is an easy way to connect and deconnect nodes from within the editor, in a way that lets scripts know which nodes can be traveled to from other nodes, possibly by adding them (by script) into a list contained within each node.

And if the way I'm doing this is below optimal, I'd also love an easier/better way. As long as the end product is a set of nodes scattered around a map that my object can travel between.

Edit: This question was obviously worded poorly, re-worded version here http://answers.unity3d.com/questions/1298313/connect-objects-for-scripts-to-use.html

Comment
Add comment · Show 7
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 agentc0re · Jan 12, 2017 at 08:25 PM 0
Share

Take a look at Behavior Designer. Thats what I use for patrolling/waypoints lots of stuff actually!! It's really cool. Also, I am not getting paid to advertise this. :D

avatar image PetomPixel agentc0re · Jan 12, 2017 at 08:34 PM 1
Share

Thanks, but this is a small, personal project I'm working on with a very simple pathfinding AI, and I'm not ready to spend $75 on it! XD I just need a quick and easy way to connect some objects together in a way that's meaningful to C#.

I'll keep it in $$anonymous$$d if I'm ever working on something bigger and need more control over my AIs :P

avatar image agentc0re PetomPixel · Jan 12, 2017 at 08:38 PM 0
Share

I saw this on the asset store a few days ago. It's priced more reasonably for a small project I$$anonymous$$O. https://www.assetstore.unity3d.com/en/#!/content/2506 it's $15

Show more comments
avatar image TBruce · Jan 12, 2017 at 08:50 PM 0
Share

Have you tried Waypoint Pro 2D, Simply A* or RAIN AI for Unity (all are free assets)?

There are more assets in the asset store that cost

Here is a list sorted by price (cheapest that costs is $4.99).

avatar image PetomPixel TBruce · Jan 12, 2017 at 09:12 PM 0
Share

Sorry, I don't think I was very clear in my question; I don't need a pathfinding AI, just a way to connect nodes together in a way that is meaningful for C#. Re-asked the question here: http://answers.unity3d.com/questions/1298313/connect-objects-for-scripts-to-use.html

Hope I worded it better.

avatar image hexagonius · Jan 12, 2017 at 09:43 PM 0
Share

you are clear about what you want, but it is tedious, because there is no algorithm behind this they could be coded. you could however write an editor script that makes it possible to select and drag gameobjects in the scene onto each other directly to connect them. our select all desired ones, then hit a coded button to choose to which other node they should connect.

0 Replies

· Add your reply
  • Sort: 

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

92 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 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 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 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 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 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

Help! Pathfinding 1 Answer

Can you use a character controller in a coroutine? 0 Answers

How to I make a gameobject follow a list of nodes and to link an instantiated gameobject to a script. 0 Answers

AI Waypoint does not loop 1 Answer

How to rotate object through waypoints on a curved path on sphere 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