Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
TF in .Move(ref tf, ref dir, 0f, CurvyClamping.Clamp)
#1
Question 
On a straight spline line lets say from SplinePivot (0, 0, 0) -> CP0000(0, 0, 0) - CP0001(10, 0, 0)
Move(0.5f, 1, 0f, CurvyClamping.Clamp) returns  (3.5~,0,0)
I expected to get (5.0, 0, 0)

Is this correct or does this happen to the math bug in 5.3.1f1?
(Henry Ford) Each hour more of searching is each hour less of your live time.

Reply
#2
For me it is (5,0,0)
Reply
#3
plz try..

Code:
       tf = 0.25f;
       var p = Spline.Move(ref tf, ref dir, 0f, CurvyClamping.Clamp);
       transform.position = p;
       Debug.Log("p = " + p.ToString("f6"));

Results at the same 10m spline here is 1.5625
Shouldn't that 2.5?
(Henry Ford) Each hour more of searching is each hour less of your live time.

Reply
#4
It will, if you use an linear spline type. Otherwise, no, it doesn't need to be 2.5! E.g. for catmull it's 2.03. For bezier it depends also on the handles. Remember: TF isn't percentage!
Reply


Possibly Related Threads...
Thread Author Replies Views Last Post
  Move CP00X position in hierarchy UsernameHed 1 547 11-12-2019, 02:01 PM
Last Post: _Aka_
  Move the Create Mesh of a CurvyGenerator Out of the Main Parent UsernameHed 3 1,434 07-08-2019, 06:57 PM
Last Post: _Aka_
  Move SplineController in rhythm of song electricpunch 10 4,032 05-16-2019, 09:02 PM
Last Post: _Aka_
  Move between control points Livealot 2 2,220 08-02-2018, 07:33 PM
Last Post: Livealot

Forum Jump: