Change Scalar Parameter

Hello,

I have a vertex animation directed by a texture, i want to speed and slow the animation with mapped keys, but i’m getting stuck on changing the Scalar Parameter in the level blueprint.

Here is the Scalar parameter that i need to affect (Speed), it basically determines the speed of the vertex animation

Here is my blueprint, i feel like it should work, but im having no luck.

Any Ideas?

i think that s not the good way to do it.
you should create your material instance on event begin play (for exemple) and store it to a variable then apply it to your mesh.
so you can access it and modify the scalar parameter on key press event.

Thanks for the response expose, could you give me an example of how that would work? I’m quite new to blueprints and code in general.

your problemis that you apply a material, and then “duplicate” this mat, and modify the duplicated (instanced) material only, that means not the one applyied to the object.

Hey expose, I’m so close to getting this, but stumbled on the last hurdle. For some reason the material interface variable wont hook up to the target. I get the below error. Did i do something wrong?

Thanks so much for all the help

hey there !
your close ! i think you didn’t use the propre variable type. try to pull the return value pin the create material instance node, rightclick (check context sensitive) and choose promote to variable. then plug this new variable in the set scalar node

WORKING!!! Thanks expose!!!