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 uniMaxi · Jul 24, 2019 at 02:28 PM · pathfindingdynamicminecraft

How to make pathfinding over Minecraft-style terrain in Unity?

Unity offers a solution for a baked navigation mesh with static 3d objects. I need to have a way to pathfind over a mesh that is dynamically altered in runtime and therefore cannot be pre-baked. I would also like to have the support for obstacles that are not blocks (such as stuff like trees and rocks on top of terrain).

The Mesh in question represents a Minecraft like terrain, best thought of as being made up of addable-removable blocks, but only incorporating the visible sides of those blocks in actual mesh. Currently, the algorithm is capable of altering a 3d mesh based on its vertices and triangles alone (i don't need to store any other data, as long as the data within the mesh itself is properly sorted), but i do still need to rebuild the entire mesh for every cube i add or remove (so it is not going to happen very often).

So, basically, what i have is a 3d mesh that can be altered in runtime by adding and removing vertices and triangles to represent adding and removing visible cube faces. Currently, every face is represented with 4 vertices and 2 triangles, but i plan to optimize it further so that i'm able to reduce the amount of vertices and triangles to represent large flat surfaces.

I haven't tried any actual pathfinding solutions yet. Trying to figure out what kind of approach would work best for the problem.

What i want is to have agents pathing over a mesh that can be dynamically altered, while taking into considerations the limitations of configurable speed as well as jump-up and fall-down distances. A solution that specifically relies on the mesh representing series of imaginary cubes of different types would be alright, but if a more general solution is available, then that's what i'd prefer.

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 I_Am_Err00r · Jul 24, 2019 at 03:02 PM

It really depends on the number of obstacles you will run into, how critical it is they follow the path correctly, etc. but A* pathfinding is usually the holy grail of pathfinding and there is a tool available that has amazing reviews (albeit a high price, there is a free version on the website but I have only used the free version for 2D pathfinding, so I couldn't tell you if that works ), but I would start googling A* pathfinding if you want to get an idea and write something yourself.

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

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

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

Dynamic Pathfinding 1 Answer

Navigation dynamic level generation 1 Answer

Dynamic Pathfinding 1 Answer

How do I do AI pathfinding in a scene that changes drastically during play 0 Answers

Pathfinding & Navigation in 3-dimensional space (proced. generated) 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