I have a bullet prefab with a script.
void Update ()
{
transform.Translate(5 * Time.deltaTime, 0, 0);//move bullet
//check bounds
if(transform.position.x > 10)
{
Destroy(this);
}
}
The bullet moves on the x-axis but stops moving once it hits 10. The object is still alive and the mesh is still rendered. How do I destroy the entire object?