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 /
This question was closed Dec 30, 2013 at 12:29 AM by Bunny83 for the following reason:

Duplicate Question

avatar image
0
Question by UnbreakableOne · Dec 29, 2013 at 01:39 AM · arraypathfindingpath

How to find path in a boolean 2D array?

Hi,

Is there any easy way to find path in a 2D array that is composed of boolean values, 1 for filled and 0 for empty?

My maps are consisted of such array and I need to be able to find paths in it for various reasons.

I'm aware of NavMesh but since maps or generated at runtime, I cannot do calculations offline.

If possible, please suggest any pathfinding asset that might help.

Best,

Comment
Add comment · Show 4
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 Benproductions1 · Dec 29, 2013 at 02:16 AM 1
Share

http://lmgtfy.com?q=pathfinding

avatar image UnbreakableOne · Dec 29, 2013 at 05:28 PM 0
Share

You don't have to reply if you don't and can't have any positive input.

It's obvious from my post that I'm well aware of "pathfinding" and posted this to get an "answer" regarding my question.

avatar image Benproductions1 · Dec 30, 2013 at 12:04 AM 1
Share

If you're well aware of it, then you know the answer!

I don't understand what's so difficult? You need to find a path between two points on your 2D array. The technique for doing so is called pathfinding. The rest is up to you

avatar image Bunny83 · Dec 30, 2013 at 12:28 AM 1
Share

@UnbreakableOne:
First of all this kind of question has been asked several times and Ben's "search" should give you almost all you need. However maybe you want to use something like this:
https://www.google.com/#q=unity+pathfinding

I don't see a question that can be answered in a straight way here. This site is not for suggestions or discussions. Also using the site internal tagging system should give you more than you ever need. If that doesn't find you the right answer you might try a site specific google search:
https://www.google.com/#q=site:answers.unity3d.com%20pathfinding

1 Reply

  • Sort: 
avatar image
2

Answer by Eric5h5 · Dec 30, 2013 at 12:28 AM

This uses a flood-fill algorithm for pathfinding. (The project is quite old, but works in Unity 4 aside from the "destroyed object stops coroutines running even on a different object" problem, though that can be fixed pretty easily.)

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

Follow this Question

Answers Answers and Comments

21 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

Related Questions

Pathfinding on Instantiated AI Vehicles 0 Answers

Grid-based path-finding, similar to Legend of Grimrock/Eye of the Beholder... 2 Answers

How to minimize directional changes of A* autopathing movement? 0 Answers

How to call a method once inside fixed update 1 Answer

Generic list of objects, then distance to those objects? (js) 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