It seems that ObjectContainer3D.removeChild() doesn't work as I
thought because if I do
"myObjectContainer3D.removeChild(myColladaModel);", myColladaModel is
still shown.

If I want to solve my problem I have to initialize an
ObjectContainer3D (adding as child one collada model) for every mesh I
have, and then I have to play with "myObjectContainer3D.visible" true
or false (for every ObjectContainer3D) or with
"myScene.removeChild()" (for every ObjectContainer3D).

Isn't there a best way to do this?

On 12 jun, 14:54, IaRRoVaWo <[email protected]> wrote:
> Hello!
>
> In my project I have a static collada model (only rotates) and I want to
> change the model everytime I push a key. What is the best way to do this?
>
> Now I load (with Loader3D) my model and add it as child to a
> ObjectContainer3D, then I add as child this ObjectContainer3D to the scene.
> When I want to change my model I call a function that remove the
> ObjectContainer3D child from the secene, and then I load another model, add
> it as child to another ObjectContainer3D and finally I add it as child to
> the scene... but, I think there is a better way.
>
> Anyone can help me? Thank you!

Reply via email to