Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Get nearest point to a world object
#4
(07-14-2020, 01:18 PM)_Aka_ Wrote: 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

Hi I agree I shouldn't re-invent the wheel, it just feels like this level of AI/pathfinding should be SO simple, it's literally just got to choose path A or B and is constrained to simply moving or stopping on splines... no obstacle courses to try and work its way around or anything tricky!

I did start to look at A* as like you say I think it's considered the best, so I'll take another look, it just felt like it might be overkill for what is essentially very very limited movement and calculations literally restricted to tracks. Thanks as always for your input!
Reply


Messages In This Thread
RE: Get nearest point to a world object - by jamesunity - 07-14-2020, 05:00 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: