#How to change VisualInstance3D layers in script

6 messages · Page 1 of 1 (latest)

quasi hull
#

Hello,
I have a MeshInstance3D part of a StaticBody3D, and I would like to change the layers of this MeshInstance3D in code. I have attached a handy picture to illustrate my problem.

Thank you for your time.

rustic falcon
#

I think that needs to happen in the _ready function

#

you can use set_layer_mask_value(1, true)

quasi hull
#

gdwheeze I swear to god, it didn't work before but now it does. I only tried with the red marked line because it didn't.

#

I removed the vi again and now it just functions

#

Thank you