So, I have a situation that texture on the top row of the cube (shaded in blue) is stretched when I move up those four vertices (blue circled ones). Note that the bottom row of the cube is not stretched because its vertices are not affected and keep its UVs.
Now the cube got a little more complicated like the following (note that the yellow shaded area is added with a 90 degree rotated UV map). I am still moving up those top vertices and observe all faces are preserving UVs.
But, as you see, the front face of the cube is being stretched. How do I fix this? Even I don’t know if this can be fixed. Anyway here is the project: https://playcanvas.com/editor/scene/1148733
Would you help one more time please?
Hi FBPlus,
I understand this is a really old thread and probably the reason the project you shared isn’t available anymore. But, would it be possible for you to share this project again? I was looking for a solution to this problem and this would really help me a lot.
@Tanay_Dimri Hi, Tanay_Dimri,Sorry for my late late reply.I am afraid I can’t share the project agin since I‘ve already deleted it,and I am currently working on some urgent projects
anyway, have you find the solution?
Hi @FBplus,
Thanks for your response. I got it to work in the scene shared in this thread with some changes. But couldn’t get to work in another scene I am working on.
Here is a sample scene I prepared for you to play around with if you get time.
“tableTop” is the entity being scaled.
scripts > Scaling > rescaleTableTop.js is the one responsible for handling calculations.
The input for Length and Width come from the slider in the UI.