Problem is not reproducible or outdated
Particle effect on collision?
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?
Answer by Pathojen · Dec 07, 2021 at 06:26 AM
Is the player set to have the tag player, and its collision shape not set to trigger? Another thing to check is if either object involved in the collision has a rigidbody.
Follow this Question
Related Questions
How to Build for Android 4.0.3 with Unity? 0 Answers
Make a Particle System play when Player gets destroyed 0 Answers
How to detect input in InputField in unity when used in android? 0 Answers
What process do I have to go through to upload my Unity 2d game onto the Android google play market? 0 Answers