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 /
avatar image
0
Question by kewo22 · Jun 25, 2017 at 06:15 PM · pathfindingnavigationminimap

How to indicate/display path-finding result in minimap ?

When player gives a destination location, in minimap the shortest path should display (like navigation system).

Comment
Add comment · Show 6
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 Cherno · Jun 25, 2017 at 07:05 PM 0
Share

You need to integrate a pathfinding solution for this, such as the Astar Pathfinding Project.

You have to convert each node's world position to the corresponding position on the $$anonymous$$imap, and then draw lines between them with the custom UI LineRenderer or whatever you want to use for this.

avatar image kewo22 Cherno · Jun 26, 2017 at 09:08 AM 0
Share

Thank you for your reply. But i don't understand how to do it. I'm new to unity and game program$$anonymous$$g.

In my game I've got a city and a player with basic movement also a $$anonymous$$imap.

i used this method to add the $$anonymous$$map https://www.youtube.com/watch?v=3-CN2DXqJj$$anonymous$$

now i need to indicate the shortest path from the current position of the player on this $$anonymous$$imap, once user gives the destination point.

Can you explain me the steps ?

avatar image Cherno kewo22 · Jun 26, 2017 at 01:15 PM 0
Share

Forget about hte $$anonymous$$imap fo now, first you have to integrate a pathfinding solution. Find one that suits your needs and once you figure out how to make your character move via pathfinding, you can focus on the $$anonymous$$imap display.

Show more comments
avatar image toddisarockstar · Jun 27, 2017 at 07:59 AM 0
Share

I agree with @Cherno .

here is the top link from google for A* pathfinding in C#:

http://blog.two-cats.com/2014/06/a-star-example/

this is pry the most simple and popular algorithim for pathfinding.

more than likely you will use an array of arrays to represent a two dimentional grid pattern to calculate your path. one you trace back the path coordinates from the A* algorithim, it would be super simple to paint that pattern on top of a texture for display. but honestly, if you get through the A* pathfinding algorithm and manage to wrap your brain around that. you wouldn't be asking about how to paint a $$anonymous$$i map.

both pathfinding scripts and how to paint a $$anonymous$$i map or texture require very good understanding of loops and arrays and how to apply it to 3d or 2d space. paging through 2d is accomplished with a loop inside of a loop and an array of arrays to accommodate two coordinates.

avatar image kewo22 toddisarockstar · Jun 27, 2017 at 07:26 PM 0
Share

appreciate your reply mate.

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

69 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

Related Questions

Pathfinding & Navigation in 3-dimensional space (proced. generated) 2 Answers

How do I fix two NavMeshAgents fighting for the same position? 1 Answer

Do your NavMeshAgents choose different paths in the editor? 0 Answers

How do you create an AI that works like this ? 1 Answer

How to use Unity's pathfinding system without NavMeshAgent controlling my character? 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