Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Spline Controller Position Force Update ?
#1
Hello Smile

I am changing the Position of the Spline Controller every frame (I have Absolute position).
I have a spline not closed, with let's say 600,5 of distance.


When I want to activate my SplineController, I set the Position to 0, but Even if the position is set to 0, I have One frame where the SplineController is not at the right position (in the next frame, and all other frame, the position is good).

[Image: IEqjRvrvSMe_curv.PNG]

It's happen in one particularte case:
- My SplineController is at 600,5 (the end of the spline)
- I desactivate my Spline and my SPlineController.
- After a while, in the same frame: I want to reactivate the Spline AND the SplineController, and set the SplineController to the position 0. And then, even if the value is set to 0, the position of the transform seems to be still at 600,5. The next frame, the position & value are good.

I think that even if I do SplineController.Position = 0; I would like to tell the SplineController something like RefreshPosition or something.

2) And a little other things: How can I tell the Position to be at the Maximum ? (my 600,5 value ?)
Of course, I can Set my SplineController.Position at _curvySpline.Length. But when I do that, the position is set to 0, and not 600,5. 
I have managed do do that:
SplineController.Position = _curvySpline.Length - 0.1f;
Then I have a Position of 600,4, but it's not precise.
Reply
#2
Hi,
1) To force update the controller, call its Refresh method
2) Change Clamping to Clamp instead of Loop, then set position to spline.Length. Read this documentation for a better understanding of clamping and other properties of controllers: https://curvyeditor.com/documentation/controllers
Available for freelance work, feel free to reach out: toolbuddy.net
Please consider leaving a review for Curvy, this helps immensely. Thank you.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Best way to duplicate a spline with an offset Kapistijn 7 330 02-07-2026, 07:59 PM
Last Post: _Aka_
Smile Constant speed along a spline? tfishell 1 433 11-13-2025, 11:32 AM
Last Post: _Aka_
  SplineController Ignores Follow-Up and Chooses Wrong Spline Josenildo 7 3,921 07-29-2025, 09:15 PM
Last Post: _Aka_
  Curvy Line Renderer for UI Spline? gekido 7 5,438 07-13-2025, 07:11 PM
Last Post: _Aka_

Forum Jump: