Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Updating old movement code
#2
Hi,

Here is some context, and after that I answer directly your questions:

That's some very old Curvy version. If not done already, make sure you read the release notes so you don't miss any new feature.

After aquiring Curvy on 2018, one of the things I worked on is to simplify the API. There was too many public methods which were basically a one liner calling another public method. I removed (and still removing) a lot of those methods to make the API as small and easy to use as possible.

Before releasing any breaking change in Curvy, I mark the API method that will change as Obsolete, while providing the new alternative. The Obsolete tag displays a compiler warning when compiling the code, and often I add to it a custom message saying what method to use instead. So for someone who updates regularly, and acts accordingly when seeing a compiler warning from Curvy, the upgrade is done smoothly. But for someone who had not upgraded for a long time, then this process becomes problematic. Ideally, the Unity asset store would allow owners of a specific asset to get all the older updates, so you could upgrade easily and gradually between consecutive versions, but this is unfortunately not the case.

Now the answers:

  1. MoveByLengthFast and other move methods were reworked and moved to the SplineController class. The closest thing you can find in recent versions is SplineController.SimulateAdvance (if you don't need events to be triggered while moving). Otherwise look at SplineController.Advance.
    If neither of those help, I am sending you the old implementation of MoveByLengthFast, but it will not compile without modifications.
  2. e.ControlPoint.Connection.OtherControlPoints
  3. I am not aware of any change in the spline's data that is not backward compatible. Let me know if you find such thing.
Did all this help?
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
Updating old movement code - by Maltakreuz - 08-17-2020, 10:59 AM
RE: Updating old movement code - by _Aka_ - 08-17-2020, 02:44 PM
RE: Updating old movement code - by Maltakreuz - 08-18-2020, 04:44 PM
RE: Updating old movement code - by _Aka_ - 08-18-2020, 04:49 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Add noise to spline controller movement DekoGames 2 10 02-06-2024, 01:28 PM
Last Post: DekoGames
Question Setting instantiated object to spline, then starting movement? _RicO 3 9 06-28-2023, 06:01 PM
Last Post: _Aka_
  Permission to publish custom CGModule source code? Apelsin 6 9,422 09-15-2022, 08:53 PM
Last Post: Josaf Tom
  How can I set the generator to stop updating? Chanon 3 19 09-08-2022, 02:54 PM
Last Post: _Aka_

Forum Jump: