Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to get realtime F value between control point.
#1
Hello.

I want to get current F value(LocalF) between two control point in realtime. 

http://imgur.com/A0ggZHc

I want interpolate two control point by using F value(LocalF).

Is there anyone to have solution?

Thank you for reading.
Reply
#2
To convert between TF and F use CurvySpline.TFToSegment(), to convert from F to TF use CurvySplineSegment.LocalFToTF().

To interpolate by F just use Interpolate() and variants on the CurvySplineSegment - they all use F/LocalF.
Reply
#3
(02-01-2017, 07:30 PM)Jake Wrote: To convert between TF and F use CurvySpline.TFToSegment(), to convert from F to TF use CurvySplineSegment.LocalFToTF().

To interpolate by F just use Interpolate() and variants on the CurvySplineSegment - they all use F/LocalF.

Thank you very much Jake. I'll try it.
Reply
#4
(02-01-2017, 07:30 PM)Jake Wrote: To convert between TF and F use CurvySpline.TFToSegment(), to convert from F to TF use CurvySplineSegment.LocalFToTF().

To interpolate by F just use Interpolate() and variants on the CurvySplineSegment - they all use F/LocalF.

Hello Jake.

I tried your suggestion. I have successed in getting CurvySplineSegment.

like this

CurvySplineSegment ss = spline.TFToSegment(sc.RelativePosition);

but I don't know how to get Local F.

ss.Interpolate(float localF)  << I want to use this function. but  I don't know how to get Local F.

I tried to finding solution at the API. but I failed to finding solution. 

please help me
Reply
#5
TFToSegment has a variant that returns the localF within that segment:

Code:
float localF;
var ss=spline.TfToSegment(sc.RelativePosition, out localF);
ss.Interpolate(localF);
Reply
#6
(02-16-2017, 08:00 AM)Jake Wrote: TFToSegment has a variant that returns the localF within that segment:

Code:
float localF;
var ss=spline.TfToSegment(sc.RelativePosition, out localF);
ss.Interpolate(localF);

Thank you very much Jake.
Reply


Possibly Related Threads...
Thread Author Replies Views Last Post
  Move between control points Livealot 2 125 08-02-2018, 07:33 PM
Last Post: Livealot
  Generate path from point A to point B taking account of direction TheLogan 1 292 05-05-2018, 02:03 PM
Last Post: _Aka_
  Add control point along spline hoesterey 3 935 03-20-2018, 04:20 PM
Last Post: nomadigi
  Detecting if I'm in a "Connection" control point atomsinthevoid 1 507 01-28-2018, 12:21 AM
Last Post: _Aka_

Forum Jump: