Jumpiness in animation when using timeline and animator controllers

I have a series of racers (horses) that each have animator components to controller their various animations. These racers are childed to a path which has its own animation that is played out via a timeline. So for example, when a race starts, the timeline starts to play, and this controls the position of all the horses on the track, but each horses individual animator component controls horse specific animations (eg whether the jockey is seated or standing), meaning we can separate race paths from individual horse animations. We do this in a standalone PC project with no issues however there is significant jumpiness in the web version, particularly when the path is controlled via a timeline. It appears as if the animator controllers and the timeline are fighting with each other or something. The same issue shown in the video occurs if I change the path to use an animator controller instead of controlling it via a timeline, however it is about 90% less jumpy. I do need timeline functionality though.

Does anyone have any suggestions on what would cause this? As mentioned above, it does not happen in our standalone PC version.

The game is running at 60 FPS. I have also tried exporting animations at a lower framerate, and limiting the timeline to the same lower FPS but that does not resolve the issue.
Rec_831.mp4

Original Post on Discord

by user 259070246382469121

Hello there – we have an experimental AI bot :robot: that might be able to help you with your question. Would you like to try this out?

What happens if your animator doesnt have the animatorcontroller?

And do you use rootmotion (i guess not just to be sure)

Do your horse animations also have forward movement?

Hey marcel,

No I dont use root motion. The individual horse animators simply control the horse animations in place (eg, idle, walk, run) - all of which are just in place (no forward or sideways movement). No root motion is used for anything.

The path object is a path exported as an FBX from 3DSMax. It has empty child objects that the horses are then childed to. So if you wanted to race cubes, or cars, or horses, it wouldnt make a difference.

Again, this exact set up works for a PC project.

by user 259070246382469121

Im asking to learn more about what might be causing it. So without the horses but with cubes parented to the path you get the same behaviour in the web?

The pc project is a unity standalone build right?

No worries. The PC project is a standalone project correct. It has the exact same set up.

I believe the issue is related to the fact there are animator controllers running on children of an object being moved by the timeline.

  • If I turn off individual horse animations, and let the timeline play, there is no issue.
  • If I have individual horse animations enabled AND I then activate the timeline, they will be jumpy.
  • When individual horse animations are playing and the path is not yet activated on the timeline, there is no issue.

In the attached video, you can see the horse animations playing. I have set it so when the path begins getting animated via the timeline, I disable the horse animator controllers to show that its perfectly smooth.
Rec_832.mp4

by user 259070246382469121

We have support to do play both timeline and animatorcontroller at the same time (or rather have both enabled and blend between them). Could you send us a bugreport so we can try with your project and see whats not working correctly here? Thanks a lot!

Yeah sure. I’ll just re-iterate that if I dont use a timeline, and instead I just use an animator controller on the path object, the jumpiness is often only a fraction of what it is when using timeline. Ive tried recording a video to show you but its so subtle I dont think youd notice. Other times it is more noticeable but not even marginally as much as in the timeline video.

Thanks for the help. Ill submit a bug report.

by user 259070246382469121

Sent the bug report with the same title as this post. Thanks @marwie1 :cactus:

by user 259070246382469121

Thank you. And don’t worry i noticed :slightly_smiling_face:

@marwie1 :cactus: I’ve just realized, if I set all the horses to use the same animator controller (eg an animator called Horse which exists in the project), they all jump at the same time, so Im thinking this could be related to the animator state offsets ? If you recall a few months back I raised an issue where state offsets were not being applied.

In the scene I zipped, each horse animator controller uses a different animator controller. Eg Horse1, Horse2 etc. If you change them to all use the same one, they all “jump” at the same time

by user 259070246382469121

Oh ok maybe try to update from NE 3.23 to something newer, i think i fixed an issue in a later version but not entirely sure if thats before or after that version

I’ve upgraded to the latest which is 3.27.4-pre and the issue is actually worse now as before it only occurred when the timeline and indiv idual animators were active whereas now it occurrs for the individual animators even when the timeline is not active
Rec_836.mp4

by user 259070246382469121

Ok, we will look into it and let you know when we have a fix. Thanks for the report and testing

No worries, thanks for the help. Appreciate it.

by user 259070246382469121

Hi @nostalgicbear the issue seems to be caused by the Rigidbody on the horse prefab interferring with the animation (even tho it’s set to kinematic) - I need to investigate further on why it has such an effect but maybe this helps you already

As a workaround you can move the collider + RacterAnimatorScript script to a child object of the horse

Thats interesting. At least thats a workaround for now. I may even leave it until after Christmas so there is no rush. Thanks for looking into it @marwie1 :cactus: . The support you give on here is next level.

by user 259070246382469121

@marwie1 :cactus: By any chance has this been resolved? I have not yet reconstructed our setup, and am wondering if I still need to make the changes above or if the issue has been resolved? Ive not upgraded my version of Needle since 15th Dec.

by user 259070246382469121