rockwell15 Posted November 1, 2017 Share Posted November 1, 2017 Hi, I have a box mesh I make for steps, but it will vary in size depending upon user input. Right now, when I add a texture, since the texture stretches to cover a face, it gets distorted on the different faces of the step. ( pic attached ) I'd like to specify a set amount (ex: 2 units width, 2 units height ) and have the texture tile with those dimensions regardless of it's mesh's dimensions. So if the mesh is 2 units high & 5 units wide, the texture will automatically tile once vertically, and 2.5 times across. I can workaround this by calculating the `uScale` & `vScale` based on the mesh / texture's size but is there any built in method to accomplish this? I'd rather not have to track the texture's dimensions & do this every time, if possible Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted November 1, 2017 Share Posted November 1, 2017 thats all controlled by your uv map. Quote Link to comment Share on other sites More sharing options...
MarianG Posted November 1, 2017 Share Posted November 1, 2017 https://www.babylonjs-playground.com/#U9AC0N#34 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.