Scale Uv

Software: Away3D 4.x

sargon, Member
Posted: 01 July 2013 12:08 PM   Total Posts: 51

Hi I cant find any information about how to scale UV with pivot point in center. I don’t get those offsetU, and offsetV props, can any one describe me how can I scaleUV with pivot point at center?

Thanks a lot!

   

CyrilM, Newbie
Posted: 02 July 2013 05:46 PM   Total Posts: 15   [ # 1 ]

There are four values.

offsetU - translates the texture in the U direction
offsetV - translates the texture in the V direction
scaleU - scales the texture in the U direction
sacleV - scales the texture in the V direction.

If you want to scale the texture as if the pivot was in the center, then do this

offsetU = ((1-newScaleU) / 2);
offsetV = ((1-newScaleV) / 2);
scaleU = newScaleU;
scaleV = newScaleV;

I believe that will work. I haven’t actually tried it though.

   

Avatar
80prozent, Sr. Member
Posted: 02 July 2013 10:33 PM   Total Posts: 430   [ # 2 ]

Hi

i dont think there is a offsetUV in the engine.
could be that i am wrong, but i had a quick look and could not find it….

[edit:] ah - yes i was wrong…SubMesh.offsetU and SubMesh.offsetV exists

 Signature 

sorry…i hope my actionscript is better than my english…

   

Avatar
Fabrice Closier, Administrator
Posted: 02 July 2013 10:41 PM   Total Posts: 1265   [ # 3 ]

you could also use UVAnimator.—> look in tutorials section on this site

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X