Search Unity

Animator OnStateUpdate deltatime problems

Discussion in 'Scripting' started by DuvE, Aug 11, 2021.

  1. DuvE

    DuvE

    Joined:
    May 22, 2016
    Posts:
    169
    Hi,

    I'm changing the character rotation parameter on its control script parameter inside the OnStateUpdate function (different script for animator). I also set the Animator to "Animate Physics" mode instead of normal, I thought that OnStateUpdate would be called like FixedUpdate, but looks like this is not the case.

    I tried using all kinds of delta times inside OnStateUpdate, but it is still framerate dependant for some reason. How can I make OnStateUpdate inside animator behave like FixedUpdate?

    PS: I'm on 2021.1.7f1

    EDIT: Already solved, OnStateUpdate is working properly, found some issue in my code.
     
    Last edited: Aug 11, 2021
    alecfilios likes this.
  2. alecfilios

    alecfilios

    Joined:
    May 21, 2019
    Posts:
    10
    what was the issue?
     
    paladim likes this.