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
  Can you move generated objects along spline? FernDigestive 1 8 04-02-2023, 12:14 PM
Last Post: _Aka_
  Feature Request-move UI elements in SceneView spawnstorm 5 20 09-17-2022, 12:37 PM
Last Post: _Aka_
  GameObjects that move along the path of Curvy Splines will protrude. yanke 5 415 10-26-2021, 09:59 AM
Last Post: _Aka_
  Move with constant velocity in Relative mode athos_k 3 1,920 07-21-2020, 11:39 AM
Last Post: _Aka_

Forum Jump: