- Home /
Speed up a simulation game like Sims, animation issue
Hi, guys. I want to speed up the whole game like when you are playing the Sims. However, there are several models imported from Maya which I cannot speed up the animation of them as I speed up the timer. I count the time using WaitForSeconds, when one time step reached, the timer will added by one. After speeding up, I minimized the time step and I want the whole game speed up at the same scale. I found out that the animation is framerate based and will rely on the processing speed of the hardware, and my game ends when all the animation ends. So every time I run my game, my timer will give me a different value because of the "random" speed of the animation. Anyone has any idea?
Answer by rutter · May 03, 2012 at 05:44 AM
`Time.timeScale` allows you to alter the rate at which time passes. Maybe give that a try?
As an alternative, you might be able to manually control your animations via the `time` or `speed` properties of the various AnimationStates associated with them (see Animation script reference and component manual).
I tried Time.timeScale before, in addition to the timescale, I didn't change anything to speed up the game, but I seemed still losing control of the animation speed. Because my game does some statistic based on the game time, and the game time will count based on the end of the game, and the game will end based on the end of the animation. So if I cannot control the animation, the statistic is hard to be accurate.
Your answer
Follow this Question
Related Questions
Can the animation editor create local rotational data? 3 Answers
Adding animation clips via script 2 Answers
Can I make animations snap to a frame? 1 Answer
How to select an animation clip by index number? 7 Answers
texture offset question 2 Answers