Posts: 6
Threads: 3
Joined: Dec 2016
02-01-2017, 08:31 AM
(This post was last modified: 02-01-2017, 12:12 PM by wjdtjr0114.)
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.
Posts: 690
Threads: 71
Joined: Jan 2015
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.
Posts: 6
Threads: 3
Joined: Dec 2016
(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.
Posts: 6
Threads: 3
Joined: Dec 2016
(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
Posts: 690
Threads: 71
Joined: Jan 2015
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);
Posts: 6
Threads: 3
Joined: Dec 2016
(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.