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);
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();