FinalIK breaks with an animated Slate cutscene on Start

Slate Forums Support FinalIK breaks with an animated Slate cutscene on Start

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1193
    Breaking Fourth
    Participant

    Disclaimer: this bug might be a stalemate.

    When a FinalIK behaviour initialises in the Start call of the first frame, it expects the character to be in the default T-Pose so that it can collect joint information to prepare its IK Solvers. This works with animations because the Mecanim Animator usually initialises AFTER all scripts have had their Start functions called.

    However, if the PlayCutsceneOnStart script is used to trigger a Slate cutscene with an Animator track, and that script is executed before the FinalIK SolverManager in the Script Execution Order (which usually seems to be the case), then the character will be in an animated pose on the first frame, and the FinalIK joint data will be wrong, causing incorrect IK results at runtime.

    We’ve worked around this EITHER by changing the FinalIK SolverManager Start function to an Awake function, OR by manually placing the Slate Cutscene script last in the Script Execution Order settings.

    Perhaps the Cutscene behaviour should be last in the Script Execution Order by default?

    #1198
    Gavalakis
    Keymaster

    Hey,

    Hmm.. As far as I understand, the problem here is not in the order which they update, but rather the order in which FinalIK initializes and PlayCutsceneOnStart call Play() on the target assigned cutscene ( which both happen on Start() ).

    I think that the problem can also be solved by yielding one frame in the Start() function of PlayCutsceneOnStart.cs like so:

    Can you please confirm that the above change solves the problem by itself?
    Thanks!

    Join us on Discord: https://discord.gg/97q2Rjh

    #1202
    Breaking Fourth
    Participant

    Yes, that fixes it, although we’ve tried this approach in other projects and it does of course introduce one frame that’s not controlled by the cutscene.

    #1215
    Gavalakis
    Keymaster

    Hey,
    Yes this will of course introduce a one frame delay before the cutscene starts (so that other scripts get a chance to initialize first), but I think that this is what we were after fixing here anyway, No? 🙂

    Thanks!

    Join us on Discord: https://discord.gg/97q2Rjh

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.