Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Shortest route to world position
Hi, and thank you for a great library!

I was wondering if anyone could help me find the most optimal way of taking the shortest route to a world position over a set of paths using Curvy.

I'm thinking about writing an extension method to Curvy which is not dependent upon tags for handling connections, but can instead automatically choose the shortest route when passing over them.

This extension method would go something like this:
MoveByShortestRoute(ref currentSpline, ref tf, ref direction, speed, curvyClamping, targetPosition, connections), where targetPosition is a Vector3 dependent upon GetNearestPointTF() to get the exact TF on the path nearest to it.
This method would then calculate and choose the shortest path using the connections you supply to it.

I don't know Curvy too well yet so I'm basicly just wondering if this would be a good way of doing this and if anyone got any thought out ideas on how to solve it technically while still preserving the feature set of Curvy.

I think this is a feature that many devs would benefit from. Maybe someone even solved this earlier?

Any help is appreciated, thanks!

we call this featureset "Spline Network". Build a network map based on (connected) spline segments and apply any logic on this map instead of the splines itself. I have some basic prototype code (and much more ideas) floating around, but nothing you really can start messing around with. Developing this feature is on halt until 2.0 is released, but it's definitely in the pipeline.

There are several problems to be solved before this will work properly (properly add metadata "can move to, can't move to etc..", synchronize map with spline when editing etc...) and some solutions are already prepared in the 2.0 codebase (like adding marker type connections, much more events).

Okay, thanks for the response, Jake.

I'll just pull some quick temporary solution customized more or less for my specific needs at the moment then. =)

Keep it up, lat0rz!

Possibly Related Threads…
Thread Author Replies Views Last Post
  Getting object on spline Position when Spline has coordinates larger than 2000 velikizlivuk 5 8 09-05-2023, 01:01 PM
Last Post: velikizlivuk
  How to detect bend in a spline or strait part of spline at position velikizlivuk 10 25 08-14-2023, 12:08 PM
Last Post: _Aka_
Video How do I merge splines only if some control points are at the sam position? arcade.autumn 5 15 02-13-2023, 09:35 AM
Last Post: _Aka_
  Generate UV in world space GameJazz 2 4 12-08-2022, 04:44 PM
Last Post: GameJazz

Forum Jump: