This no longer works as is in v1.88
(due to changes in showentity behavior?)
Showentity will not do anything if
the parent entity is not visible.
Function UpdateLod(lodpivot,lodcamera,distbias#=250)
If Not EntityInView(lodpivot,lodcamera) Return 0
distlod#=EntityDistance(lodpivot,lodcamera)
;HideEntity lodpivot
HideEntity GetChild(lodpivot,1)
HideEntity GetChild(lodpivot,2)
HideEntity GetChild(lodpivot,3)
If distlod<1*distbias
ShowEntity GetChild(lodpivot,1)
ElseIf distlod<2*distbias
ShowEntity GetChild(lodpivot,2)
ElseIf distlod<3*distbias
ShowEntity GetChild(lodpivot,3)
EndIf
End Function
(due to changes in showentity behavior?)
Showentity will not do anything if
the parent entity is not visible.
Function UpdateLod(lodpivot,lodcamera,distbias#=250)
If Not EntityInView(lodpivot,lodcamera) Return 0
distlod#=EntityDistance(lodpivot,lodcamera)
;HideEntity lodpivot
HideEntity GetChild(lodpivot,1)
HideEntity GetChild(lodpivot,2)
HideEntity GetChild(lodpivot,3)
If distlod<1*distbias
ShowEntity GetChild(lodpivot,1)
ElseIf distlod<2*distbias
ShowEntity GetChild(lodpivot,2)
ElseIf distlod<3*distbias
ShowEntity GetChild(lodpivot,3)
EndIf
End Function