Posts: 51
Threads: 23
Joined: Jun 2014
01-10-2016, 08:18 PM
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.
Posts: 690
Threads: 71
Joined: Jan 2015
Posts: 51
Threads: 23
Joined: Jun 2014
01-11-2016, 02:17 AM
(This post was last modified: 01-28-2016, 11:59 PM by Trainzland.)
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.
Posts: 690
Threads: 71
Joined: Jan 2015
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!