Using a box collision blueprint as a volume to interpolate between 2 texture inputs within a material

Hi all,

Hopefully I’m posting this in the correct section of the forums. There is material involvement but I believe my problem is mostly blueprint oriented. I am fairly beginner in blueprint still, so whilst I’m seeking a solution for one particular problem, please feel free to critique my overall approach.

I have created a simple setup that allows me to use a volume (box collision) to lerp between two texture inputs within a material. Any part of the mesh that has this material applied to it, will display input A or B depending on wether it is inside of the volume. This is comprised of 2 blueprints (one spawning the volume, and a parent that coordinates 2 arrays of volumes and static meshes), as well as a master material which is used to drive the lerp, and act as the base for dynamic material instances that are created as part of the blueprint)

Currently, I am able to have multiple volumes in my scene, each affecting a static mesh that I have paired it with within the parent blueprint. I can move and scale the volume and see real-time updates. However, when I rotate one of the volumes, let’s say 45 degrees, the coverage of the volume remains square, as opposed to diagonal, which it should be at that angle:

How would I resolve this? Based on what I know, I need to somehow sample the local transforms of the box volumes in my blueprint, and then feed that back to my master material somehow? Here are my blueprint and material setups for reference:

Main custom event in Parent BP:

Exposed arrays in Parent BP:

image

Master material nodes for setting up the Alpha that controls the lerp between texture A or B:

^ The two Vector Parameters in the material are the ones being set at the end of the blueprint chain

The Blueprint that contains the box collisions. In the construction script, it will fire the Custom Event of the parent BP if Valid.

Thanks in advance for any help!