Search Unity

is Root Motion messing with transform.LookAt in 2017.4?

Discussion in 'General Discussion' started by Bogu-94, May 3, 2019.

  1. Bogu-94

    Bogu-94

    Joined:
    Dec 11, 2013
    Posts:
    58
    Previously we were using Unity 5.5.6 to work on our Android Project for 3 years.
    But it has compatibility problem with Android 8.0 or later that makes the Crash Rate very high at 2-4%. We need to take care of that JNIbridge thing, targetting higher API level (I think I got email where google said they will remove apps that's using Unity <5.6 by 2021).
    So we decided to upgrade to Unity 2017.4 LTS, because it still use old prefab system.

    For a week we have restored the Shader and Plugin errors, and some deprecated scripts. That leaves us with the Combat System. (if you're interested you can install it here)
    No codes or animator setup that is changed when upgrading. But this major bug just show up.

    5.5.6:
    - Root Motion enabled
    - when attacking, character will face nearest enemy (using transform.LookAt)
    - can also change direction mid-combo

    2017.4:
    - Root Motion enabled
    - when attacking, there's a split second (maybe, 1 frame) that the character facing nearest enemy
    - but in the next frame, character face the original rotation again (before attack)
    - changing the direction mid-combo will not change the direction of character, but it creates that 1frame glitch.
    - turning off Root Motion solves this rotation problem, but most of my combat animation is using root motion to move. So it's not the solution.

    I hope there's a simple solution :(