Search Unity

Timescale and Animator.velocity weird behaviour

Discussion in 'Animation' started by ramXVI, Dec 15, 2020.

  1. ramXVI

    ramXVI

    Joined:
    Jul 21, 2015
    Posts:
    3
    Hello ¤_¤

    i've been using Animator.velocity and Animator.angularVelocity since the beginning of times, and i have this weird bug in bullettime (Time.timeScale = .1f for exemple) where their values are already multiplied by Time.timeScale, and sometimes they are not

    and i have to change the code each time it switches to one or the other behaviour, and for my builds i have to save in a .json weither i need to divide them by Time.deltaTime or not. it's been years, i'm finishing my game and this thing is still following me D:

    sorry for my english
     
  2. ramXVI

    ramXVI

    Joined:
    Jul 21, 2015
    Posts:
    3
    well.. i guess i just found a way
    for anybody interested

    i set my character animator updateMode to UnscaledTime
    and in Update i do animator.speed = Time.timeScale

    to verify that i had a case where a prefab pulled from the project view had the problem, and one loaded at runtime from an assetbundle had not the problem (or the inverse)

    and both show the same behaviour under a modified Time.timeScale now.. finally S_$

    i wonder why i didn't find anybody with the same problem
     
  3. Kybernetik

    Kybernetik

    Joined:
    Jan 3, 2013
    Posts:
    2,570
    That's pretty strange behaviour. You should submit a bug report.