Skip to content

How to change material of model in system plugin? #842

Closed
@gezp

Description

@gezp

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedWe accept pull requests!renderingInvolves Ignition Rendering

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions