I’m using the shruiken particle system and made code for it
using UnityEngine;
using System.Collections;
public class Fire : MonoBehaviour {
public GameObject water;
private bool destroyed = false;
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update(Collision collision)
{
if(collision.water.tag)
Destroy(gameObject);
}
}
How do I get it to disappear after colliding with anher game object?
I tried it and it don't work.
– dudedude123Is your water tagged "water" maybe its Destroy(this.gameobject); I wrote this off the top of my head, so I didn't get to test it.
– DblfstrThat don't work either
– dudedude123Is it even detecting a collison?
– DblfstrNot really
– dudedude123