Different approach to "Shredder"

I’m not a big fan on having something destroyed based on a collision so I did this instead

void DestroyBullet()

{

    if(transform.position.y > Camera.main.ViewportToWorldPoint(new Vector3(0,1,0)).y +1)

    {

        Destroy(this.gameObject);

    }

}

Good job, Jaredl. Thanks for sharing your solution! The Unity programmers had a similar idea as you and created the OnBecameInvisible method. :slight_smile:

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms