I have some wooden boards that get spawned in with different lengths but same widths and heights. How do I setup tiling to account for that?
If they are separate objects, you don’t.
Each has it’s own UV and the texture normally automatically stretch to cover them.
So, maybe that’s not what you meant? / explain a little better with screenshots?
The actor source that is being spawned is the cube at the bottom right.
I define 2 positions with line casts then spawn a board between them with some orientation logic.
It then scales them to be the length needed to span the distance.
I need to set the texture to not stretch. Thanks for your help.
Oh, ok NOT stretch.
Well use the UVs.
You already know that a full UV value is the whole object.
Therefore if you Multiply by .5 (which is a division) you have the tile repeating 2 times on an object.
Since I don’t know what method you are using to spawn the item - is is a scaled box? or a proc. mesh? - I can’t suggest a “best” way to do this.
I can tell you that you can either use the Object Scale, or the Object bounds.
UV / Object bounds (mask RG) - Multiply x Repeating Percentage -> UV of texture.
If you want the tile to repeat 2 times you multiply x200 - The value is linked to the object bounds in the X/Y dimension. Z is ignored.
You can work similarly with the Object Scale except usually you just pass that into the multiply with nothing but a mask to decide what to look for - even a single value like what you seem to need.
Ok yeah im just scaling a box. Ill try out some of the things you mentioned and see if I can get it to work. Thanks
Ok, so I attempted both methods. I clearly am lacking some understanding because neither work. I get what you are saying but for some reason (my naivety from a weeks worth of Unreal) I cant get it to work.
Pretty much what you said to do. I just needed to up my UV/Blueprints knowledge base a bit. Thanks man
What does the CustomRotator do to the material? Is it to create variation in how the material maps or appears on the mesh so it’s not exactly repeating?
No, it’s like the panner, it shifts the UVs rotating the material.
you could use it for any purpose that you want, including spinning a material like a disk.
I believe it works in Radians, so a value of 2pi would be a full turn. Don’t quote me on it though.
BTW, any blue function like that you can double-click and read up. Its usually the major source of learning how to do stuff…
Yeah I used the CustomRotator to turn the UV’s 90 degrees. Note that every .25 on the rotation angle is 90 degrees. I believe to find center you set it to .5.