- Home /
(C#) Control time scale with an animation curve?
So pretty much what I'm trying to accomplish is some sort of drift thing like in Sonic Riders: Zero Gravity where when the drift button is held, time slows to a crawl so the player can make a very tight turn and time resumes as normal as soon as the drift button is released. I have the variables and everything set up but I just need to know if I can actually pull this off with an animation curve or if there's a better way to go about this.
Answer by Buckslice · Oct 26, 2017 at 08:29 AM
If you have everything setup you should try it! It sounds quite possible. You can use Time.realtimeSinceStartup and some timers to help evaluate the AnimationCurve properly and set the Time.timeScale when pressing and releasing the drift button.
Your answer
![](https://koobas.hobune.stream/wayback/20220612141857im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
Distribute terrain in zones 3 Answers
Door opening sound, according to opening speed/direction? 1 Answer
How to work a real life timer? 2 Answers