Sfoglia il codice sorgente

Fixed doesn't property load when 1 frame animation.

pull/5561/head
あるる / きのもと 結衣 6 giorni fa
parent
commit
832701b69f
1 ha cambiato i file con 4 aggiunte e 1 eliminazioni
  1. +4
    -1
      src/rmodels.c

+ 4
- 1
src/rmodels.c Vedi File

@ -6244,7 +6244,10 @@ static bool GetPoseAtTimeGLTF(cgltf_interpolation_type interpolationType, cgltf_
} }
// Constant animation, no need to interpolate // Constant animation, no need to interpolate
if (FloatEquals(tend, tstart)) return true;
if (FloatEquals(tend, tstart))
{
interpolationType = cgltf_interpolation_type_step;
}
float duration = fmaxf((tend - tstart), EPSILON); float duration = fmaxf((tend - tstart), EPSILON);
float t = (time - tstart)/duration; float t = (time - tstart)/duration;

Caricamento…
Annulla
Salva