Merge pull request #192 from Disquse/fix-transform-multiply

Fix renderable transform multiply
This commit is contained in:
dexyfex 2023-08-21 14:24:54 +10:00 committed by GitHub
commit eddd2c74a5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -300,7 +300,7 @@ namespace CodeWalker.Rendering
{ {
Matrix ptrans = (parentind < modeltransforms.Length) ? modeltransforms[parentind] : Matrix.Identity; Matrix ptrans = (parentind < modeltransforms.Length) ? modeltransforms[parentind] : Matrix.Identity;
ptrans.Column4 = Vector4.UnitW; ptrans.Column4 = Vector4.UnitW;
trans = Matrix.Multiply(ptrans, trans); trans = Matrix.Multiply(trans, ptrans);
parentind = ((pinds != null) && (parentind < pinds.Length)) ? pinds[parentind] : (short)-1; parentind = ((pinds != null) && (parentind < pinds.Length)) ? pinds[parentind] : (short)-1;
} }
} }