W
W
woodyJS2017-06-07 12:01:43
Unity
woodyJS, 2017-06-07 12:01:43

How to remove a clone of an object when going out of the scene (2d)?

I started to study units and made a small semblance of a flappy bird.
And now the question is how to remove object clones (Pipes between which a bird flies), after they left the scene?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Daniil Basmanov, 2017-06-07
@woodyJS

The simplest thing is to check by coordinates that the pipe is to the left of the bird, and remove it when the distance exceeds a certain threshold. The second option is to use Renderer.isVisible or Renderer.OnBecameInvisible to check if the pipe is on screen.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question