Closed
Description
I want to change color of model dynamically by using plugin. Then I modify component Material
in component Visual
by using SetComponentData()
in PreUpdate()
, but there is no effect.
SDF::Material material ;
ignition::math::Color color(1,0,0,1);
m.SetAmbient(color);
m.SetDiffuse(color);
m.SetSpecular(color);
_ecm.SetComponentData<components::Material>(visualEntity,m);
So, Does anyone know how to change material of model in system plugin? Thank you!