I am trying to get my particle system to be off until the player walks into the trigger. THen once the player is in the trigger are the particle system will be turned on. I need to make my pickup items “sparkle” when the player gets close. This is what I have so far but I cant get it to turn on when the player is in the trigger…
using UnityEngine;
using System.Collections;
public class ParticleEffect : MonoBehaviour {
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update ()
{
particleSystem.enableEmission = false;
}
void OnTriggerStay(Collider other)
{
if (other.tag == "Player")
{
particleSystem.enableEmission = true;
}
}
}