Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Get nearest point to a world object
#3
Hi,
I see your problem as being two separate problems:
1- find the way between points A and B
2- make the train follow that way

Point 2 is related to Curvy. Using a mechanism similar to the Junction mechanism in the example scene 12 should do the trick.
Point 1 is a wider problem, not specific to Curvy. It's basically path finding. Since you are planning to have multiple rail roads connected, I think you better try to find an already existing path finding solution that would work good, instead of trying to invent your own path finding algorithm. I have no real experience with the path finding problematics, but I did some projects using that when student. A* algorithm was a good algorithm at that time (is there anything better since?). It's a simple algorithm, and I am sure you can easily find implementations for it using C#
I would advise you to read this: https://en.wikipedia.org/wiki/Pathfinding
Please consider leaving a review for Curvy. This will help a lot keeping Curvy relevant in the eyes of the Asset Store algorithm.
Reply


Messages In This Thread
RE: Get nearest point to a world object - by _Aka_ - 07-14-2020, 01:18 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Getting Distance from a World Point zorksox 3 5 04-16-2024, 07:30 PM
Last Post: _Aka_
  Avoiding runtime GC allocations on control point position change Ell223 8 18 02-24-2024, 10:43 AM
Last Post: _Aka_
  Removing the objects behind an object alms94 6 6 12-06-2023, 09:31 PM
Last Post: _Aka_
  Connection "next' control point jh092 3 15 11-22-2023, 11:47 AM
Last Post: _Aka_

Forum Jump: