Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Spline Controller Flickering
#5
Hi

Before giving the answer to the problem, you have the following line twice in a row, I believe it is a mistake from you:
Spline.Add(new Vector3(0, 0, 0));

About the issue: you are having a SplineFollower.Position that is increased every frame, and your splines have a maximal length of 30. So after some time, SplineFollower.Position will be bigger than 30. Let's say that a specific frame it is 40, and you spline length is 30. You controller's Clamping is set to Loop, so that means that your 40 will be equivalent to a position of 10. Now next frame, your SplineFollower.Position is 40.1. Let's imagine that your spline length this frame is 20. That means that you position, after looping, will be equivalent to 0.1. That means that your sphere jumped a distance of 9.9 backwards. Next frame it will jump some distance either forward or backward, creating the flickering effect.

The solution: Move should call Controller.Position += amount instead of its current implementation. This is because Controller.Position, unlike SplineFollower.Position, is always in the right range of values.

Let me know if you are struggling with the suggested solution.
If and when you feel like it, please leave a review for the asset, that helps a lot
Have a nice day
Please consider leaving a review for Curvy. This will help a lot keeping Curvy relevant in the eyes of the Asset Store algorithm.
Reply


Messages In This Thread
Spline Controller Flickering - by blabz2007 - 08-27-2021, 11:38 PM
RE: Spline Controller Flickering - by _Aka_ - 08-28-2021, 08:55 AM
RE: Spline Controller Flickering - by blabz2007 - 08-31-2021, 12:15 AM
RE: Spline Controller Flickering - by blabz2007 - 08-31-2021, 07:31 PM
RE: Spline Controller Flickering - by _Aka_ - 08-31-2021, 08:56 PM
RE: Spline Controller Flickering - by blabz2007 - 09-02-2021, 11:03 PM
RE: Spline Controller Flickering - by _Aka_ - 09-03-2021, 09:29 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Set Volume to the Volume Controller at Runtime pako88 2 10 04-08-2024, 03:26 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: