This is a simple question. I did it a couple of times already, don't know why I can't get it done now... I made a particle effect, I want this to get played when the player collides with the platform. Here's what I've done:
public class StartingPlatformFall : MonoBehaviour
{
//public GameObject smoke;
//public GameObject spawn;
public ParticleSystem smoke;
private void OnCollisionEnter(Collision collision)
{
if (collision.gameObject.tag == "Player")
{
//Instantiate(smoke, spawn.transform, Quaternion.identity);
smoke.Play();
}
}
}
What am I doing wrong?