Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Using timeline to manually animate curvy position.
#6
(12-20-2018, 12:30 PM)_Aka_ Wrote: Ok, I found an explanation for the issue, and have a solution for you

The explanation:

It all boils down to a difference in the frame rate at which the object moves vs the one at which the camera is updated. When these two rates are irregular, you will notice in some frames that the camera moved but not the object, which creates the jittering feeling.
You need to know that when you edit the "Position" property through an animation, the object does not actually move until the SplineController script is updated. The update happens in Play mode at the method specified by the "Update In" field, and in edit mode it happens when Unity's callback "EditorApplication.update" is triggered

To better explain the issue, I will subdivide the issue in two:
  • In play mode: In your project, your controller is updated in Fixed Update. In your project, this means at 50 FPS. The game renders at a different and higher frame rate, so this leads to having situations where the object does not move between two rendering frames, which creates the jittering. Like you found yourself, setting the object to move in Late Update solves the issue. Setting Use Cache to true does not influence that, at least in my experience.
  • In edit mode (timeline preview): this is where the issue is the worst. This is because Unity triggers EditorApplication.update at a very irregular rate.

The solution:
  • In play mode: you found the solution already
  • In edit mode: make the controller update more frequently. There is surely a smart way to do it, which I will try to include in the next update, but for now, here is the overkill solution: Update whenever possible. I will send you via PM a modified version of the controller, that don't have the "Update In" field, and instead updates all the time.
I hope this helped

Have a nice day

Thanks a lot! I will take a look at the controller, really appreciate for the quick and detailed response!  Heart
Reply


Messages In This Thread
RE: Using timeline to manually animate curvy position. - by gtpdz - 12-20-2018, 08:47 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Curvy Line Renderer for UI Spline? gekido 3 6 04-04-2024, 12:56 PM
Last Post: _Aka_
  8.8.0 is live, and it improves Curvy Generator greatly _Aka_ 1 10 04-03-2024, 03:16 PM
Last Post: _Aka_
  snap to the curve created by the curvy splines segment points ShiroeYamamoto 3 11 04-02-2024, 02:24 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_

Forum Jump: