Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Add ControlPoint "ahead" of spline end
#3
Thanks so much for the quick reply.

I've been playing around some more now that you have confirmed that GetTangent is probably the way to go. I came up with this which is working the way I want it to. Thank you again.

Code:
var v = spline.GetTangent(1).normalized;
var pos = spline.ControlPointsList[spline.ControlPointCount - 1];
spline.Add(pos.transform.localPosition + v * 10);
Reply


Messages In This Thread
Add ControlPoint "ahead" of spline end - by jh092 - 10-22-2023, 07:57 PM
RE: Add ControlPoint "ahead" of spline end - by jh092 - 10-23-2023, 07:06 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  How to get length starting from one spline to connected nth spline Dragon-3623 1 1 05-14-2024, 04:52 PM
Last Post: _Aka_
  Curvy Line Renderer for UI Spline? gekido 3 6 04-04-2024, 12:56 PM
Last Post: _Aka_
  Get position of all control points for a spline gekido 1 6 03-28-2024, 10:08 PM
Last Post: _Aka_
Bug Changing spline connection in inspector causes splines to revert to defaults lacota 3 6 03-18-2024, 07:55 PM
Last Post: _Aka_

Forum Jump: