- Home /
Question by
NinjaRubberBand · Aug 03, 2014 at 09:23 AM ·
cameraobjectlag
Make object invisible when camera is not seeing it
How do i Make a object invisible when camera is not seeing it? I thought that it might prevent some lag.
Comment
Answer by codestage · Aug 03, 2014 at 09:40 AM
Your object outside of Camera's frustrum automatically get culled (frustrum culling), i.e. not rendered (please note, if any part of mech will be in frustrum - whole mech will be processed).
But if you wish to perform any specific actions when your object (with Renderer component) is get in / out from frustrum, I'd suggest to try OnBecameInvisible and OnBecameVisible first.
Your answer