Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
CurrentTF from SplineWalkerCon
I am trying to get CurrentTF from the SplineWalkerCon component. But it's not accessable like it is in FollowSpline. I want to control the speed of the walker based on the scale of the ControlPoints. Is there another way? Can I easily add that? Example? Thanks.

The easiest way is to copy&paste SplineWalkerCon.cs into a new script and change the code in doUpdate():

The movement is done either by Spline.MoveByConnection() or Spline.MoveConnection() and the speed is calculated by "Speed*Time.deltaTime". You can take "mTF" there to find the previous or next ControlPoint and change the speed input according to that. Should be pretty selfexplanatatory.

Feel free to ask if you need further assistance,


Forum Jump: