Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Finding relative position across connected splines
#1
Is there a simple way to determine the relative position of two spline controllers on separate, connected splines?   I'd like to determine what position a train car is within a train (first, second, third, etc.) when the train itself may span multiple splines.

I'm guessing that I'll need to create a list of the track splines (or a lookup table) and assign values to each spline to define 'west' and 'east' relative positions for each, but I'm wondering if there is an easier solution.
Chip
Deko Games
dekogames.com
Reply
#2
The distance between two cars can vary depending on the track, whether it is a line or a circle for example. But still, those changes should not be very big (expect if your track has very tight turns). So why not just compute the distance between the cars, divide it by the length of a car, and round to the closest number. That should indicate the number of cars in between.
Did this help?
Please consider leaving a review for Curvy, this helps immensely. Thank you.
Available for freelance work—feel free to reach out.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
Information New free asset: Converter For Dreamteck Splines _Aka_ 0 0 07-19-2024, 08:27 PM
Last Post: _Aka_
Information New free asset: Converter For Unity Splines _Aka_ 20 61 07-19-2024, 05:15 PM
Last Post: _Aka_
  Invisible Gizmos In Latest Curvy Splines orrenravid1 1 5 06-11-2024, 07:36 AM
Last Post: _Aka_
  How to get length starting from one spline to connected nth spline Dragon-3623 1 4 05-14-2024, 04:52 PM
Last Post: _Aka_

Forum Jump: