Set an object invisible


I display many object in my scene and sometimes I need to set an object invisible.

I haven't find a method to set the object invisible.

How can I do it ?


Invisible as in completely out of the scene? Then just detach it from its parent.

Invisible as in there for picking and interactions? Then change its AlphaState and Material to create a pure transparent object.

you can set the cullmode to CULL_ALWAYS like this: