How to stretch my scale in unity 3d ?

Hi All,

I think i had face some tricky situation in the unity 3d.

Actually my task is to stretch my scale to some point.

below is my scale look in the scene. if i drag a point to upwards i want my scale is stretch to upwards in the same scale.

10790-scale.png

the scale part is a maya game object with texturing.

For suppose if i drag a point to 3.4 in the y direction. than i want to show my scale is 4 times.with same texturing in y direction. in the same way x direction also.

please tell me a way how to do that task. i am little new to this type of tasks.

can i get a reference or else any coding help.

please help me

Thanks & Regards

Shankar

One approach is to increase the tiling of the texture as the height of the object is increased:

function Update () {
	renderer.material.mainTextureScale = Vector2(1.0, transform.localScale.y);
}

I ran a quick test with a plane and a cylinder using your ruler above, and it worked. But if you’ve UV mapped the texture onto the 3D object it will not work.