|
Im working on a function to reset projectiles when they move off camera in my 2D iPhone space shooter. The function is called every frame.
The problem i am having is that it seems the renderer.isVisible function seems to return false for one frame after is has been enabled, adfter the first frame it returns true as expected. This causes the projectile to be immediately reset the same frame its enabled. The weird thing is that this function worked perfectly earlier. Do anyone know why the gameobject would return false on renderer.isVisible on the first frame, and how i can fix it?
(comments are locked)
|
|
why not just use OnBecameInvisible?
(comments are locked)
|
