Skip to content

Instantly share code, notes, and snippets.

@winkels
Last active March 25, 2018 10:46
Show Gist options
  • Save winkels/9770427 to your computer and use it in GitHub Desktop.
Save winkels/9770427 to your computer and use it in GitHub Desktop.
Unity script that allows for particle motion while Time.timeScale = 0. See http://www.asteroidbase.com/?p=569 for context.
using UnityEngine;
using System.Collections;
public class TimeScaleIndependentParticleSystem : TimeScaleIndependentUpdate
{
protected override void Update()
{
base.Update();
particleSystem.Simulate(deltaTime, true, false);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment