How can I change the value of a variable by moving a character?

Hi! I’m starting to use unreal and I want to change the color of my character whit its movement. When the character goes up I want it to be red and when it goes down i want it to be blue. I have a variable called “fac” that controls how the red and blue textures blend in the material. So, I would like to know how to increase or decrease the value of the variable whith the movement of my character.

Thanks for your responses.

Hi there @Iha1771,

Welcome to the Unreal Engine forums.

This topic has been moved from International to Programming & Scripting.

When posting, please review the categories to ensure your topic is posted in the most relevant space.

Thanks and happy developing! :slight_smile: