RigidBodyCombiner, hide(), and you


I was messing around with 3d mouse picking and decided I wanted to hide the picked node. I thought a simple call to NodePath.hide() would do it, but nothing happens :frowning: I tried to remove it with removeNode(), but it’s still there.

The nodepath in question is part of a RigidBodyCombiner and I’m guessing that’s why nothing works for me. But why is it so? Why can I move, scale and rotate nodes in an RBC, but not hide them? I tried calling collect() after hiding a nodepath, still no luck. In my application the user will constantly be adding and removing nodes from a larger collection of nodes, too many to send individually to the GPU. If I can’t use the RBC, then how should I solve this? I guess I suppose I could make smaller chunks and flatten them, destroy one, add a node, recreat the chunk, flatten it, etc. etc., but surely there must be some better way?

Merry Christmas!

Realized I hadn’t tried to remove the node and then collect(), only tried hide() -> collect(). It worked better. Never mind then :slight_smile:


Note that calling collect should be used spairingly… What you could’ve done was call size on the object and made it so small it was unseenable from player’s view or moved it from the camera’s view by moving it behind the camera.

Yes I realized that too later. But the user will be removing and adding nodes a lot, so at some point I will have to call collect again as the new nodes accumulate. I figure if I use small sets of nodes in my Combiners, collect() won’t be that heavy.