vec_for_uv (VECTOR*, ENTITY*, var number);
vec_to_uv (VECTOR*, ENTITY*, var number);
Modifies the skin texture position of a certain model vertex. vec_for_uv
sets VECTOR to the texture uv coordinates of the given vertex number; vec_to_uv
sets the texture to new uv coordinates given by VECTOR.
Parameters:
VECTOR* |
uv skin coordinates in x and y. The z component is ignored. |
ENTITY* |
entity pointer |
number |
number of the mesh vertex in the MED status line |
Modifies:
VECTOR* - set to a uv skin coordinate by vec_for_mesh.
Speed:
Medium
Remarks:
-
These functions don't support map entities, sprites, or chunked terrain, and are replaced by ent_getvertex/ent_setvertex that should be used for new projects.
- Modifying a mesh of a certain entity affects all entities that use the
same mesh.
- Modifying skin texture coordinates
of a certain entity affects all entities that use the same mesh.
- Skin coordinates
are not automatically saved by game_save(). If this is desired,
store the mesh coordinates in an array.
Example:
function shiftskin(ent,num) // displace the skin position of a vertex
{
vec_for_uv(temp,ent,num);
temp.x += 1; // move the skin coordinate by 1 pixel horizontally
vec_to_uv(temp,ent,num);
}
See also:
ent_vertices, ent_fixnormals,
vec_for_vertex, vec_for_normal,
vec_for_mesh, vec_for_min,
vec_for_max
► latest
version online