- Home /
light flare flickering from particles
Hi there!
I am currently trying to create a particle system looking like an intense snow storm. I have a few static light flares in my scene which worked fine until i added a small script to move the particle system (emitting around 3000 snowflakes) with the player.
As long as the particle system is not moved, the light flares work fine. When i change the position or rotate the system, they flicker (about every 5 frames).
I really appreciate your help.
using UnityEngine;
using System.Collections;
public class SnowPosition : MonoBehaviour {
public Vector3 positionOffset;
public float rotationY;
public GameObject playerRoot;
Vector3 setPosition;
void Update () {
setPosition = playerRoot.transform.position;
setPosition += positionOffset;
// if any of these next lines is included, it flickers
transform.position = setPosition;
transform.localEulerAngles = new Vector3(0.0f, rotationY, 0.0f);
}
}
Comment
Your answer
Follow this Question
Related Questions
Make spotlight flicker when seeing enemy? 1 Answer
Lens Flare Scale Down On Distance??? 1 Answer
Military flares with particles 1 Answer
Help with my Light Flicker Script... 1 Answer
Painting a particle effect? 0 Answers