Question by
AndersMalmgren · Jul 24, 2016 at 12:01 PM ·
lodvisibilitylodgroup
Visiblity and lod groups
We have a game model controlled by IK. There is no use solving the IK if the model is occluded or culled because of Lod distance.
OnBecameVisible and OnBecameInvisible does not seem to work as they only report visibilty for the LOD0 or the LOD mesh they are attached to
Whats the best way of getting visiblity state?
I could illitterate over all LOD meshes in the Update method and check if t hey are enabled, but not nice to interrate over an array in the Update method for performance reasons.
edit: This works for if the object is culled from LOD distance, not if culled because of occlusion
renders.Any(r => r.isVisible)
Comment