When a mesh node is hidden, does Godot calculate its geometry?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Macryc

Hi! Suppose you have a fairly large structure in your level which is a tscn containing quite a few meshes and colliders in it, and you want that whole tscn to constantly rotate. You attach a script to it to rotate.
Now here’s the question. If you set that tscn to .hide, will Godot still calculate the rotating meshes in the background? Or will it only start doing so once you set the scene to .show?
(I am thinking or showing scenes only when they enter an area attached to the character, to aid performance. The other idea is to place position markers , eg. spatial nodes, all over the level and only add objects as children of said markers when you get closer to them)

:bust_in_silhouette: Reply From: Calinou

When you hide a mesh, it won’t be rendered anymore but its octree (used for frustum culling) will still be calculated. This shouldn’t be an issue unless you have a ton of meshes, still. If you want to avoid this, you have to remove the node from the scene entirely. remove_child() should be enough, but if it isn’t, you may have to use queue_free() instead.