Open
Description
Environment
- OS Version: all
- Source or binary build? 8.6.0
Description
- Expected behavior: Calling
sim::Light::SetDiffuseColor
followed bysim::Light::SetSpecularColor
to work. Example:
gz::sim::Light light(light_entity);
light.SetDiffuseColor(ecm, gz::math::Color(1.0, 0.0, 0.0, 0.0));
light.SetSpecularColor(ecm, gz::math::Color(1.0, 0.0, 0.0, 0.0));
- Actual behavior: Only the last set value takes effect. Looking at the code in
Lines 326 to 344 in 523b01b
SetDiffuseColor
orSetSpecularColor
will set theLightCmd
component. But if you call one after the other without a whole step in between, theLightCmd
from one will overwrite the other. The code already checks if there's aLightCmd
component, but instead of updating the value of the component, it always replaces it with a new value.
Metadata
Metadata
Assignees
Type
Projects
Status
In progress