Move Vertices to Another Coordinate

   968   0   0
User Avatar
3 posts
Joined: Sept. 2016
I am a beginner of VEX.

I have quad polygons, I want to move vertices to another coordinate.
the Vertex in the lower left is to the lower left, the upper right is to the upper right.

I first got the 0:0 vtxofprim and moved it to the lower left of new coordinate.

vector2 newUVArray= {{0.5,0.0},{1.0,0.0},{1.0,1.0},{0.5,1.0}};
for ( int i=0; i<4; i++ )
setvertexattrib(0, “uv”, 0, i, newUVArray, “set”);

However, depending on how to divide the polygon, I noticed that vtxofprim is not constant.

How can I get each Vertex from the original UV?

For example, define lower or upper, left or right from original Vertex 's coordinates and use it?
Or, does Vertex closest to UV coordinate {0, 0} be defined as “bottom left”? (like “uvdist”)


UV.jpg (112.1 KB)

  • Quick Links