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
Please consider leaving a review for Curvy. This will help a lot keeping Curvy relevant in the eyes of the Asset Store algorithm.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Curvy Line Renderer for UI Spline? gekido 1 1 10 hours ago
Last Post: _Aka_
  Get position of all control points for a spline gekido 1 2 10 hours ago
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_
  GO can't fit end of the spline GameDeveloperek4123 3 13 03-04-2024, 11:06 AM
Last Post: _Aka_

Forum Jump: