Hiding entities

Blitz3D Forums/Blitz3D Programming/Hiding entities

Moraldi(Posted 2007) [#1]
Is there any way to tell Blitz3D do not render entities (animated or static) when these are far away from camera, in order to improve speed execution?

Thanks


big10p(Posted 2007) [#2]
Well, you can do this using EntityInView, EntityDistance (from camera) and HideEntity. Don't know how much of a speedup this would buy you, though. Guess it depends on the game.

Also, If you use HideEntity, those entities no longer take part in collisions. If this is a problem, set the mesh's EntityAlpha to 0 to hide them instead. This will stop them from being rendered, but still participate in collisions.

I think that's right.


Rob Farley(Posted 2007) [#3]
or just set the camera draw distance and blitz will handle it for you.


big10p(Posted 2007) [#4]
And there's EntityAutoFade, too.


Moraldi(Posted 2007) [#5]
Thanks!