0
\$\begingroup\$

I made first person model in blender. It also has animations in it.

Most of animation works fine, but in some cases, Unity's keyframe interpolation makes wrong result.

Note that animation was made by 60 frames per second in Blender.

To explain my problem, you have to see my model:

enter image description here

As you can see there are two magazines. Each named Mag1 and Mag2 and Mag1 is the magazine that attached to the gun.

Mag2 is always located very bottom of the screen so that it is impossible to see, except reloading animation.

While reloading, first pull out the mag1 from the gun and put in the mag2 to the gun. And here is the trick, after mag2 is attached to a gun, hand put the mag1 somewhere, maybe magazine pouch.

Anyway as soon as mag1 disappeared from the screen, it switches mag1 and mag2 immediately at only single frame. So mag1 is now move back to the gun and mag2 is also reloated to bottom.

In Blender, it seems nothing wrong but in Unity is quite different. As soon as mag1 disappeared, it doesn't switched immediately and it moves smoothly animated so I can see that magazines were moved. I'm pretty sure that this happens maybe Unity interpolates keyframes.

I already turned off Animation Compression option and resample curves, but still won't worked.

This is the video that I made to explain my situation: https://www.youtube.com/watch?v=7aew959ejL4&feature=youtu.be

Is there a way to "turn off" that interpolation? I want to disable it only that frame. Unity doesn't allow me to edit animation clip, so I just duplicate animation clip and change the option(I don't know what it called) to "Flat" and use that clip instead, but still have same problem. (Note that it wasn't easy because Unity doesn't show me the animation if I duplicate and modify it)

I struggled this issue almost a year and still figuring out how to fix it, and I think it's time to solve it. Any advice will very appreciate it.

\$\endgroup\$
2
  • \$\begingroup\$ Between pulling out mag1 and putting in mag2 can you switch the mags offscreen so you are actually putting mag1 back in? \$\endgroup\$ Commented Jun 14, 2018 at 9:59
  • \$\begingroup\$ @ratchetfreak What's the meaning of "offscreen"? Sorry, I don't know what that is. And I can't switch mag1 and mag2 that moment, because the constraints of those mags and other bones will mess up everything. And if I can, it will still have same issue, only different will be the position of both mags. \$\endgroup\$
    – modernator
    Commented Jun 14, 2018 at 10:09

0

You must log in to answer this question.

Browse other questions tagged .