How Do I make a character change material properties when touching a box trigger.

the function is called “set vector parameter value”.

  • mid is more intended for “one use” materials.

  • mpc is more intended for global changes you want to automagically distribute to all material instances that use this mpc.

  • custom primitive data is more intended for “static” or procedurally generated gameplay element changes. the function for that is called “set custom primitive data vector”.

in either case you can get away with a single float. you could use a color curve or a lerp inside the shader/material.

to fade it you gotta compute the fade over time in the blueprint. just a lerp with some delta time math you gotta compute on tick. basicly…

on begin overlap. set fade active. set fade direction up. enable tick. on tick do the fade math and “svpv”. and disable tick when done. on end overlap it’s the same just the fade direction is down.

there are some nuances to make this clean code. i’ve done that with bpi. so you interact with another actor that does the tick management on it’s own.

trigger logic. is currently begin overlap only. you could change the intensity parameter to your fade direction and/or make it function on end overlap aswell.

fade logic

just replace the sun with your mid or mpc and the set intensity with “svpv”.