Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Shortest route to world position
#1
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!
Reply
#2
Hi,

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).

Jake
Reply
#3
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!
Reply


Possibly Related Threads...
Thread Author Replies Views Last Post
  Convert position of a point on a spline to another spline which is connected ATHellboy 5 140 02-17-2020, 12:17 PM
Last Post: _Aka_
  Move CP00X position in hierarchy UsernameHed 1 249 11-12-2019, 02:01 PM
Last Post: _Aka_
  Spline Controller Position Force Update ? UsernameHed 1 851 05-16-2019, 12:20 PM
Last Post: _Aka_
  Position SetFromString Vectorvision 2 1,199 02-14-2019, 07:12 AM
Last Post: Vectorvision

Forum Jump: