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
Smile Simple splines movement shills 3 3,495 02-26-2025, 09:40 AM
Last Post: _Aka_
  How can I set the generator to stop updating? emerrryjones 1 1,759 07-26-2024, 10:07 AM
Last Post: _Aka_
  Left-right movement, and spline follow shihaya 3 2,837 07-12-2024, 12:50 PM
Last Post: _Aka_
Question VolumeController CrossRelativePosition Very Choppy Movement pako88 5 4,038 06-07-2024, 03:43 PM
Last Post: _Aka_

Forum Jump: