New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Show/hide Object3D ? #251
Comments
Currently you can do that like this:
|
Thanks! It works like a charm. |
FYI - To hide all children of myObject3D, snippet above should now read:
|
I think this functionality is not yet resolved. I want to hide an object (hiding all children) but the current way of doing it (traversing) isn't feasible because I want to maintain the visible status of its children. For example, some children are visible and others not; hiding the parent should hide all children but showing it again should show children that were previously visible. |
I agree. |
FYI: Setting visible on a parent now affects children also. (tested with r71) |
Using r72. Setting visible on parent does not seem to affect children. Has the functionality changed again ? |
@agnivade no, it hasn't changed. Setting |
Thanks. Must be something wrong with my code then, will check. |
Thanks |
You could just invoke calling myObj3D.visible = true Shows everything. |
The `.setVisible` method is not in the Mesh documentation, or in the Object3D documentation. Changed this according to here: mrdoob#251 (comment)
It's an old discussion, but there's an important caveat here, set visible to false "only" hides the object and it's children for the camera, but they still visible for the raycaster, unless you use 2 different layers and you disable them from the layer the raycaster is observing. If you want to make them fully invisible is needed to disable them in the layer used by the raycaster. objects visible but not raycasted: and objects hidden and not raycasted: |
@jscastro76 you may be interested in #19012 |
thanks, I'll take a look to it! |
Thank you it works! |
I try to figure out how to show/hide Object3D ans his childrens at any moment.
The text was updated successfully, but these errors were encountered: