Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Animation Lags When I Play

Discussion in 'Getting Started' started by TanmaySOLO, Oct 9, 2019.

  1. TanmaySOLO

    TanmaySOLO

    Joined:
    Sep 6, 2019
    Posts:
    9
    I have been trying to figure out what i have done wrong, when my character moves for example if i press "w" the character should move forward, which it does but it has this weird jiggle/laggy behaviour which i don't know why. I have been trying to find a solution cause the animation in maya is okay.
     

    Attached Files:

    • 1.png
      1.png
      File size:
      1 MB
      Views:
      433
    • 1.png
      1.png
      File size:
      161.3 KB
      Views:
      412
  2. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    It is probably because you are also playing Idle many times a second, likely not what you want. You could remove the final Else statement or rethink your logic. You can place Debug.Log statements in your code which will show in the Console window to show what code is executing. Instead of putting that code in an Update() method, try first with just a button click.
     
    TanmaySOLO likes this.
  3. TanmaySOLO

    TanmaySOLO

    Joined:
    Sep 6, 2019
    Posts:
    9
    Tried but no luck :(
     
  4. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    Yes that might be expected if you made a mistake. Please show your updated code.