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
  Spawn object on Curvy Spline. ktpttd 3 104 11-20-2019, 01:38 PM
Last Post: _Aka_
  Dummy spline points hnngaf 1 65 11-17-2019, 06:01 PM
Last Post: _Aka_
  Refresh spline doesn't seem to be working dazz777 4 139 11-13-2019, 11:13 PM
Last Post: _Aka_
  Move CP00X position in hierarchy UsernameHed 1 74 11-12-2019, 02:01 PM
Last Post: _Aka_

Forum Jump: