Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Animate movement with curve by distance, not time
#3
(01-30-2017, 05:46 PM)Jake Wrote: What about setting animation time by length of segment?  You can access the segment either in the OnControlPointReached event or in your custom controller and it has a Length property.

I'd go the custom controller route (it's more flexible) and check the distance to the last and the next CP frequently. Then you can apply speed changes at will.

Its a good idea but I'm having some problems to try to accomplish that. I'm trying to create a custom controller based on SplineController, and access to the segment length and animation time from there (as you said). The problem is I am looking at the SplineController and CurvyController and cant handle how it works properly. I get access to Speed, Length, TF value and other data but I dont know how to access to the current segment (F and length) or the animation time.


Can you point me out how to access this values with a small code snipet please? (I know the theory from your advice, just not sure how to get the data necessary) I'm trying to understand both CurvyController and SplineController but there are many things beyond my comprehension.

Thank you again
Reply


Messages In This Thread
RE: Animate movement with curve by distance, not time - by yandrako - 01-31-2017, 12:37 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
Smile Simple splines movement shills 3 3,222 02-26-2025, 09:40 AM
Last Post: _Aka_
  Morph game object along curve. mikechr2000 5 3,029 02-04-2025, 09:30 PM
Last Post: _Aka_
  Scaling a closed curve rickgplus 1 1,479 01-16-2025, 06:52 PM
Last Post: _Aka_
  Extrapolate past curve endpoint Madgvox 3 2,371 09-10-2024, 01:24 PM
Last Post: _Aka_

Forum Jump: