Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Character movement in animation vs. in script

Discussion in 'Animation' started by Izmail360, Mar 6, 2018.


What is the best practice to handle character movement?

  1. Handle position change in animation.

  2. Handle position change in script.

  3. It does not really matter.

  1. Izmail360


    Oct 11, 2017

    I have come through couple of tutorials on the internet and as far as I understand, in order to move character, there are two approaches.

    1. Create animation, which would animate movement as well as change character position. Then in C# script, we would just pass parameter speed into animation and then animation would handle the movement itself.
    2. Create animation, which would only animate movement. No translation is be applied in any axis. Then in C#, we would take care of position change, based on speed.
    I really cannot choose, which approach I should use - as for me, both looks more less the same.

    Which approach is the right one (best practice) in
    A) 2D game?
    B) 3D game?