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
  Converting spline collider hit point to spline position jh092 7 139 06-26-2020, 09:48 PM
Last Post: _Aka_
  Control points parenting briceio 2 123 06-18-2020, 04:12 AM
Last Post: briceio
  Control points close together causing mesh overlap amccraw 5 303 05-23-2020, 06:08 PM
Last Post: _Aka_
  How to I get positions between control points dazz777 0 172 05-08-2020, 05:12 PM
Last Post: dazz777

Forum Jump: