richardbiely / Voxelmetric

An efficient voxel framework for Unity3d

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Block UV's showing incorrectly reversed...

XeonG opened this issue · comments

commented

Surprised you hadn't fixed this yet, but incase you didn't know the uv textures are the wrong way around... I noticed it earlier when using a texture with text on it and the letters were reversed. don't really notice with normal textures like grass...

BlockUtils.cs

public static void PrepareTexture(...

    vertexData[3].UV = new Vector2(texture.x + texture.width, texture.y);
    vertexData[2].UV = new Vector2(texture.x + texture.width, texture.y + texture.height);
    vertexData[1].UV = new Vector2(texture.x, texture.y + texture.height);
    vertexData[0].UV = new Vector2(texture.x, texture.y);

This seems to fix the issue of them being shown reversed.... a very similar issue and fix to the earlier collider code :)

This has been fixed a while back. Closing.