Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Look at next point
#3
(11-01-2018, 11:10 AM)_Aka_ Wrote: Hi,

CurvySpline.InterpolateByDistance allows you to get a point on a spline that is at a specific distance. Please take a look at the CurvySpline class, since it has various methods that should help you reach your goal. For example: TFToDistance, DistanceToTF, GetNearestPointTF, etc...
Also take a look at example scenes, for example 05_NearestPoint.unity, to see examples of usage of these methods.

Hope this helped.
Have a nice day

Thank for the help. I came to this solution which unfortunately doesn't work as expected :

NextPoint.transform.localPosition = splineController.Spline.InterpolateByDistance(splineController.Spline.Position)

I expected the NexPoint gameObject position to be exactly on the curve but it's offset...
Reply


Messages In This Thread
Look at next point - by art_mike - 11-01-2018, 10:15 AM
RE: Look at next point - by _Aka_ - 11-01-2018, 11:10 AM
RE: Look at next point - by art_mike - 11-01-2018, 12:44 PM
RE: Look at next point - by _Aka_ - 11-01-2018, 01:50 PM
RE: Look at next point - by art_mike - 11-01-2018, 03:35 PM
RE: Look at next point - by _Aka_ - 11-02-2018, 10:09 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Control Point Interpolation Overrides. rickgplus 1 519 12-11-2025, 08:52 AM
Last Post: _Aka_
  12_Train junction point richardzzzarnold 5 3,397 04-16-2025, 02:19 PM
Last Post: _Aka_
  OnAfterControlPointAdded - Control Point is null jh092 5 3,157 02-04-2025, 09:31 PM
Last Post: _Aka_
  How to generate gameobject on the control point Yang Yi 1 1,602 12-10-2024, 10:14 PM
Last Post: _Aka_

Forum Jump: