Issue with my picking

I use frame buffer picking
I get the [MeshInstance]

but here how to access the color of material?
selection[0].material.diffuse = new pc.Color(0,1,0);

Hi @grzesiekmq,

If you would like to update the material color, then do this:

// as long as selection[0] is a mesh instance
selection[0].material.diffuse = new pc.Color(0,1,0);
selection[0].material.update();
3 Likes