- Home /
How to Gradually Increase Speed with Lerp or Slerp?
Hey guys,
I'm wondering how I can have this code gradually build up to speed, instead of taking off like a rocket. I understand that lerp or slerp may be the case, but am unsure how to implement it into the code. If that's even the case.
var relative : Vector3;
relative = transform.TransformDirection(0,0,0.1);
controller.Move(relative * Time.deltaTime * forwardSpeed);
Any help or ideas would be really appreciated.
Thanks!
Comment
Answer by code-blep · May 15, 2013 at 08:50 PM
Hi,
This post really does cover it all in detail: http://answers.unity3d.com/questions/29751/gradually-moving-an-object-up-to-speed-rather-then.html
Good luck!
Your answer
Follow this Question
Related Questions
How to use Vector3.Lerp without slow-down 3 Answers
Moving the player toward a direction 1 Answer
How can I Vector3 Slerp or Lerp locally? 3 Answers
I'm Having Trouble With Vector3.Reflect.. Please Help? 1 Answer
Constant Transform Lerp 3 Answers