Search Unity

Make the agent swap animations

Discussion in 'ML-Agents' started by ariel7590, May 10, 2022.

  1. ariel7590

    ariel7590

    Joined:
    Oct 12, 2018
    Posts:
    4
    Hi
    I made a fighting game that has a lot of animations.
    The problem is that OnActionReceived is called per fixed time (kind of like FixedUpdate) which prevents my agent from swapping animations during the fight.
    I tried already to use flags in OnActionReceived and swap the animations in Update but it didn't work.
    Does anyone know what to do in a situation like that?