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.
CurrentTF from SplineWalkerCon
|
07-14-2014, 10:23 AM
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, Jake |
« Next Oldest | Next Newest »
|