Oh it does work if the box is a component inside a BP, that’s what I tested with the zebra striped sine shader in the picture above.
You see the right two meshes have hemisphere component icons inside them and I scaled the actual component and not the actor.
I’m spending way too long time on this it has to stop now. I did make a UV variant so that I can have skewed boxes and might be a bit more flexible.
It was just meant for the boxes in my 3D vr gui so enough already!
The new one is a bit too confusing to post here but it uses the same principle as the above one just UV coords instead of local position. Also I had to do some custom UV layout so that I could have three planes to be scaled correctly.
UVs: three sets of quarter size areas.
same shader but now uv based
Actually, I should add a ‘skewfactor’ var probably as the end sides get longer than the ObjectScale indicates.