- Home /
Unscaled Time for particle system?
Hi there,
I'm making a jump&run game that could potentially go on forever, so I want to gradually increase the speed. To do that, I simply increase Time.timeScale (but not further than to 1.5, after that it gets impossible). The game starts with a timeScale of 1 and all the animations and particle systems where created to look good at that scale. If the timeScale increases, the animations and particle systems get faster, too. Thing is, I don't want that. I already figured that if I set the Update Mode of an Animator to "Unscaled time" then the animation will always have the same speed.
Is there any equivalent for the particle systems? Or any other method for accelerating the game physics but not the animation and particles?
Thank in advance!
Answer by seantheyahn · May 30, 2015 at 11:29 AM
Attach this script to your particle system object: using UnityEngine; using System.Collections;
public class UnscaledTimeParticle : MonoBehaviour
{
// Update is called once per frame
void Update()
{
if (Time.timeScale < 0.01f)
{
particleSystem.Simulate(Time.unscaledDeltaTime, true, false);
}
}
}
But this is veri slow, in my project it takes 25% of render time when two objects use it (but there are only UI elements)
Answer by Warcel · Nov 01, 2014 at 05:54 AM
I used this and it worked perfectly on time scale 0: Every unscaled update you call particleSystem.Simulate()
Reference: http://docs.unity3d.com/ScriptReference/ParticleSystem.Simulate.html
Your answer

Follow this Question
Related Questions
How to emit particle or un-pause particle when timescale =0? 4 Answers
How to speed up simulation time without distorting results 0 Answers
Instantiate objects faster and faster over game time,Instantiate objects faster and faster over time 1 Answer
Speeding up the game while still making it run deterministically 0 Answers
Smoothly start and stop particles 1 Answer