Search Unity

  1. Looking for a job or to hire someone for a project? Check out the re-opened job forums.
    Dismiss Notice
  2. Unity 2020 LTS & Unity 2021.1 have been released.
    Dismiss Notice
  3. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

Animator : Update Physics & Interpolation

Discussion in 'Animation' started by mcapdegelle, Aug 15, 2019.

  1. mcapdegelle


    Nov 7, 2014
    Hey guys, I'm having a hard time with mecanim.

    I'm trying to do a sword combat system. I want it to be precise & deterministic even when the framerate is not stable. I want to do my collision detection & velocity update (based on the root motion data) in the fixed update.

    Now the thing is a can set the animator update mode on "Animate Physics", and it would solve a lot of my problems, but the bones only update at the fixed timestep frequency. Why? It should do a full simulation in the FixedUpdate & Interpolate in the normal Update based on the remaining time right? (Just like rigid body intepolation) I don't want my character to be animated at 50Hz when the framerate is 144Hz, and I can't do slow-mo modifying the TimeScale, it's even worse.

    Sooo right now, I use the animator in the Normal update mode to get smooth animation. I extract root motion & sword position sampling each attack animation clip on startup, so I can use it in the FixedUpdate. It kinda works, but It's not robust : The data will be wrong if I do IK...

    Do you guys have other solutions?
  2. Quadropups


    May 23, 2017
    I'd like to know the answer to this too. This feature would be indeed really useful.
  3. IgnisIncendio


    Aug 16, 2017