(Picture is unrelated, but required)

When combining meshes of each part into one, vertex positions and normals are transformed from one object space to the other, but the tangents are copied as is.

This is in the PartGroupScript's CombineMeshes method, and a possible fix is the following (note that handedness is preserved):

Vector3 transformedTangent = matrix4x.MultiplyVector(PartGroupScript._combineSource.Tangents[i]).normalized;
PartGroupScript._combineTarget.Tangents[num2] = new Vector4(
    transformedTangent.x,
    transformedTangent.y,
    transformedTangent.z,
    PartGroupScript._combineSource.Tangents[i].w
);

Bug Done Found in 1.0.8.0 Fixed in 1.0.9.5
Sandbox View

1 Comment

  • Log in to leave a comment
  • Profile image

    Well that is embarrassing... thanks!
    The fix should be in the next patch (due to hit the beta branch within a day or two I believe)

    1.2 years ago

No Upvotes

Log in in to upvote this post.