Bläddra i källkod

fix normal transform in `UpdateModelAnimation`

pull/4634/head
Bigfoot71 3 månader sedan
förälder
incheckning
feb55e80da
1 ändrade filer med 1 tillägg och 1 borttagningar
  1. +1
    -1
      src/rmodels.c

+ 1
- 1
src/rmodels.c Visa fil

@ -2380,7 +2380,7 @@ void UpdateModelAnimation(Model model, ModelAnimation anim, int frame)
if (mesh.normals != NULL)
{
animNormal = (Vector3){ mesh.normals[vCounter], mesh.normals[vCounter + 1], mesh.normals[vCounter + 2] };
animNormal = Vector3Transform(animNormal,model.meshes[m].boneMatrices[boneId]);
animNormal = Vector3Transform(animNormal, MatrixTranspose(MatrixInvert(model.meshes[m].boneMatrices[boneId])));
mesh.animNormals[vCounter] += animNormal.x*boneWeight;
mesh.animNormals[vCounter + 1] += animNormal.y*boneWeight;
mesh.animNormals[vCounter + 2] += animNormal.z*boneWeight;

Laddar…
Avbryt
Spara