How to force drawable to be visible

Something infinite should not be culled by frustum, e.g. sky box, infinite grid in tools, etc.

How can I force the drawable to be visible?

Any ideas?

Thanks!

1 Like

Set an infinite bouning box for this drawable.
I mean, it’s literally what Skybox does, just check its code.

1 Like

Thanks Eugene!

Shall we have a public SetBoundingBox interface for Drawable ?

Currently, only some of the Drawables have this interface - NavArea, TerrainPatch, Zone, StaticModel(private method), and Model(as Resource).

Edit: It seems local boundingBox_ sometimes cannot control and even not used when we are calculating worldBoundingBox_ in OnWorldBoundingBoxUpdate, which means, control local bounding box does not work for many cases.

The original design seems to use OnWorldBoundingBoxUpdate to control the eventual world bounding box. I guess rewritting OnWorldBoundingBoxUpdate is the right way to go. Though, it means we need to use inheritance and override the interface.