Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Updating old movement code
#3
(08-17-2020, 02:44 PM)_Aka_ Wrote: ...
Hi, thank you for a quick response. Well yes, my project developmentĀ lasts a little bit longer as i wanted. Probably it was unity 4.3 -> 5.6 -> 2018.2 -> 2019.4 updates. And Curvy 2.0.4 seems to work until 2018.2 pretty well, so i just used the old version.

1. Thank you, yep after some adjustments the old code almost works again. My old code expects splines in relative mode, but old function "MoveByLengthFast" ensures player moves same speed on long and short segments. But with this "hack" my code seems to work well in relative mode but moving in world unity. I basically switching to Abs-mode for short time:

Code:
splineController.MoveMode = CurvyController.MoveModeEnum.AbsolutePrecise;
splineController.DoAdvance(spd, Time.deltaTime);
splineController.MoveMode = CurvyController.MoveModeEnum.Relative;
I hope this is OK and does not ruin anything inside of Curvy. (i can not just switch SplineController to absolute mode, would be nice but breaks old code).

2. Yes, it works. Thank you!

3. It seems to work well with splines created in 2.0.4. No problems was found.

So thank you for your help.

[Image: giphy.gif]

P.S. It would be probably much nicer just rewrite it all from scratch, new API looks easierĀ indeed, but ... well i did not planned any curvy-programming. I just want to update to unity 2019 Smile
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: