animation channel test

This commit is contained in:
devZoGok
2021-10-19 19:06:41 +03:00
parent 33d077bc94
commit b2ee272327
8 changed files with 133 additions and 12 deletions
+1 -1
View File
@@ -72,7 +72,7 @@ namespace vb01{
Keyframe nextKeyframe = animChannel.keyframes[pastKeyframeId + 1];
int pastFrame = pastKeyframe.frame;
int nextFrame = nextKeyframe.frame;
ratio = (float)(channel->getCurrentFrame() - pastFrame) / (nextFrame - pastFrame);
ratio = (float)(max(0, channel->getCurrentFrame() - pastFrame)) / (nextFrame - pastFrame);
interpMode = pastKeyframe.interpolation;
switch(animChannel.type){