- Home /
I want a TimeScale=0 to affect on everything except a particle system
is this possible? Thanks! )
rigidbody.AddForce(movement * speed * (Time.deltaTime / myTimeScale));
setting myTimeScale to 0 isn't helping, because I want to stop my gameobject when it's jumping and continue jumping when a player cames back to the game.
It is doable, but you may have to go to a lot of trouble to make it happen. What do you want the particle system to do during the pause?
Answer by HexadimensionalerAlp · Aug 19, 2014 at 03:31 PM
No because timescale effects everything except the characterController.
I don't know but when you make a pausemenu for example you have to disable the sripts. Before that I was able to move my player though I set timescale to 0.
Answer by misterPantoni · Aug 20, 2014 at 06:56 AM
Add this little Script to your Particle System, and it will run independent of TimeScale:
using UnityEngine;
using System.Collections;
[RequireComponent(typeof(ParticleSystem))]
public class ParticleController : MonoBehaviour
{
private ParticleSystem pSystem;
public void Awake()
{
pSystem = gameObject.GetComponent<ParticleSystem>();
}
public void Play(){
pSystem.Simulate(Time.unscaledDeltaTime,true,true);
}
public void Update()
{
pSystem.Simulate(Time.unscaledDeltaTime,true,false);
}
}
You can play the Particles by callind the "Play()" function, if you need a one-Shot Play.
Your answer
Follow this Question
Related Questions
Javascript Timescale Problem 0 Answers
Can i ignore timescale when playing AudioSource.PlayClipAtPoint ? 1 Answer
'timeScale' is not a member of 'Time' 1 Answer
Game over scene when the time is up ? 2 Answers
The Speed of Built APK 0 Answers