How to properly set Vector Parameter Value?

Hi,

I’m getting started with UE4 blueprint scripting. I’m using the 2.5D project template and the idea is that I want to change the template character’s colour when I press a button :

  • 1 to red
  • 2 to green
  • 3 to blue

So, I’ve set a Dynamic Material Instance “characterMat” on my creation script.

And I’ve used this in my event graph to set the Vector Parameter DiffuseColor to the appropriate value.

This however is not working for me. When debugging I can see the setters being called but it has no effect on the actual game.

Thanks for your help!

Try setting the created Dynamic Material instance as the material used by the Mesh (Use Mesh->SetMaterial). This goes right after the last node in your first pic.,

It was supposed to work without this, but lets try everything.

Ok thanks that worked!

Happy to help :slight_smile:

Could you mark this thread as solved
-Thanks

Weird… I have already checked your answer as valid, but it doesn’t tag the thread as resolved

i don’t know how i do this: Use (Mesh->SetMaterial). I´m having the same problem.

well,I have been reading ArtMaster-I for days,this problem sucked me ,but I found that we just change the DiffuseColor to “BodyColor”, then it worked.
you know ,it all because of the new UE4 version,it changed!
I hope I can help the later learner to face this.

If anyone stumbles across this, go check this thread for an added layer of weirdness!

As you’ll be able to see, you can do this without any Dynamic Material Instance, which is VERY strange, since the documentation clearly states it cannot be done