setModelBound(new BoundingBox()) trouble

Hi, I have a problem…

To use object picking by ray I need to set bounds for each object, and when I call setModelBound(new BoundingBox()) - my model diapears from scene ( I think it related with some culling process ).

Please help to resolve my  problem.

Alex.

did you call updateModelBound() after setting the new bounding box ?

Yes I do, but it does not have effect.

When I try to call setCullHint(Spatial.CullHint.Never) - model shows partially ( some meshes stll invisible )

Are you extending BaseGame or SimpleGame? If the latter, do you have a ZBufferState?

I am extends SimpleCanvasImpl

ZBufferState also used successfully and scene renders successfully if I don't use setModelBound…

Maybe I need to call some specific camera functions to apply correct frustum ?

Please look at this picture.



There are 2 model on scene ( 2 Shared meshes procuced from one model )

First model ( left )  - renders correctly,  second model - incorrectly.

Few meshes in the second model culled…

Both meshes has setModelBound(), updateModelBound, updateWorldBound, but first mesh shows correctly, second - not…

Both models placed to scene with same code…

Please help to find solution :frowning:

You might try rendering the bounding volumes with the Debugger class just to verify they are good.