Hi,
In my DK like ImpAI demo i do the UV setup dynamically to change textures. I tried to change from the current vec_to_uv method to ent_getvertex/ent_setvertex
however, this produces a completely wrong setup(visually destroyed).
Thats what i did before:
VECTOR LVec;
CONTACT LC;
LVec.x = AX*textile_size + textile_correction;
LVec.y = (AY+1)*textile_size - textile_correction;
vec_to_uv(LVec, AEnt, VertA);
and thats what i do now:
VECTOR LVec;
CONTACT LC;
LVec.x = AX*textile_size + textile_correction;
LVec.y = (AY+1)*textile_size - textile_correction;
ent_getvertex(AEnt, &LC, VertA);
LC.v.u1 = LVec.x;
LC.v.v1 = LVec.y;
ent_setvertex(AEnt, &LC, VertA);
it does not matter if i use LC.u1 or LC.v.u1. In both cases, messed up
I have a method which modifies 4 vertices in a row(given VertA, VertB, VertC, VertD index numbers).
My function used vec_to_uv 4 times, now it uses the new method described above for the first vertex and the last 3 times still use the old method.(i changed the first and keept the last 3 to compare)
Can someone help me?
Greetings
Rackscha