Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Spline.Length not updated unless I add a point to spline (or modify it) first.
#1
I create a spline and add two points to start. Then in another function I move the "last point" to make a "straight" spline. But when I call spline.Length right after moving the point, it's always "0". I tried doing a spline.Refresh() and it still says 0. Only way I got it to work is by adding a temporary point right after moving the last point with InsesrtAfter(), then instantly deleting it. This seems to refresh the spline and then ".Length" works.

Any idea?
Reply


Messages In This Thread
Spline.Length not updated unless I add a point to spline (or modify it) first. - by _RicO - 08-24-2023, 06:53 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Getting Distance from a World Point zorksox 3 5 04-16-2024, 07:30 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: