World Bounding Box Based UVW?

Hi there, first time here.

My goal is to project a texture based on the world bounding box of the object. So, no matter what the mesh rotation is, the texture will always be straight and follow the world axis, the top of the texture beginning at the world z highest point of the mesh and ending at the world z lowest.

BoundingBoxBase_0-1-UVW function kinda is what I want but the problem is that the bounding box is local, so my texture is rotating when the mesh is rotated. I’d like the gradient to remain horizontal and stretch according to the world bounding box height.

I’ve toyed a lot with Actor Position, Absolute World Position, ObjectLocalBounds and ObjectBounds nodes (someone might explain how this last one works ? it seems to output half the dimension of the world bounding box but it seems to break if the mesh is rotated) to create custom UVWs but I couldn’t manage to make it work. Any help ?

Thanks !

Hey, not sure if you still needed help with this but I was wondering the same thing and I think I’ve come up with a working solution.

My only worry is that things might get iffy if you mess with the objects bounds. But otherwise it works well. Hope this helps! :slight_smile:

1 Like

dadavis1992 > that’s great! Thanks a lot for the help