Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Distance travelled across multiple splines
#1
Hi there,

I have a car that travels over multiple connected splines, I'm trying to work out how to keep track of the total distance the car has travelled.

Guessing that I need to keep a tally of distance travelled each frame but that's where I'm stuck.

Thank you (again) for any help.

John
Reply
#2
Hi
I am assuming you use a SplineController.
SplineController.Distance gives you the distance of your object from the start of the spline. You can use that.
I hope this helped.
Please consider leaving a review for Curvy. This will help a lot keeping Curvy relevant in the eyes of the Asset Store algorithm.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
Information New free asset: Converter For Unity Splines _Aka_ 5 18 04-25-2024, 11:11 AM
Last Post: _Aka_
  Getting Distance from a World Point zorksox 3 5 04-16-2024, 07:30 PM
Last Post: _Aka_
  snap to the curve created by the curvy splines segment points ShiroeYamamoto 3 11 04-02-2024, 02:24 PM
Last Post: _Aka_
Bug Changing spline connection in inspector causes splines to revert to defaults lacota 3 6 03-18-2024, 07:55 PM
Last Post: _Aka_

Forum Jump: