Home > other >  How to use script to achieve the unity within the character moves step
How to use script to achieve the unity within the character moves step

Time:09-27

, save the children me this to make music cannot get c #
To achieve such a function:
Each press movement key, the next role moving a unit of distance, a movement to button again after the next move, namely how to realize the role step by step to walk, not very free move this dish thank you bosses!

CodePudding user response:

Basic logic: the player character keys - play character animation - mobile coordinate/vector (a fixed direction distance)
Judge branches: character button, the current in the walking state (using function to judge character animation state or the state machine) - cancel moving again,
  • Related