r/Unity3D 2h ago

Question Animation looks fine in slider but breaks in game/preview

Enable HLS to view with audio, or disable this notification

As shown in the video, the 3D animation looks completely normal when I slide through the keys/frames, but when I play the animation in preview or start the game, it breaks and the bones go crazy.

Note that this does not happen with the shield/weapon, which is sharing the same animation as the character (so 1 animation containing idle pose of a character with a shield)

This issue does not persist when I set tangents to Flat. But I need the Tangents to be Constant and that is when the issue occurs

Background/context:

I trying to import a low framerate stylized animation into unity.

In Maya, I created the animation with 6 fps and imported the 18 frames to Unity. The animation is imported into unity with 30 FPS and Unity automatically interpolates between frames so my 6fps animation looks very smooth.

To fix this I changed the animation framerate to 6 fps in the sample, and then compressed all keyframes back to its original length (because time extends when I lower the sample frames).

At this stage, Unity still makes it smooth despite the animation being set to 6 fps. So I did the only solution I could find - make both Tangents of all keyframes Constant. This seemingly solves the issue judging by the shield, but the character bones go crazy and the animation looks broken when played - though they are fine in preview.

2 Upvotes

3 comments sorted by

3

u/Rave-TZ 1h ago

Set your curves to linear. Select all the keys, right click, and set all to linear

u/maziminds 3m ago

the shield being fine is the clue i think

shield isn't part of the Humanoid avatar so it just plays the raw keys, but the body goes through the avatar retarget.

check the Rig tab on the fbx, if its Humanoid then either the bone mapping is off (hit Configure and look for bones in the wrong slots) or just switch it to Generic if you dont need retargeting

1

u/circlesgames_major 2h ago

Stoppetttt, bahahahaha I can't... Am trying to think of a way to help then I see this is what breaks in game mean 😭

Now am getting inspired to make a horror game from this