81554

2D Character, left animation is not being accessed

Question:

I have issue in Unity with my 2D characters animation. I simply made the animation of it walking right and left. I set things up in the animator, and for some reason the right animation is being accessed, but not the left whenever I press "A". This is the code part of animation of my PlayerController script:

anim.SetFloat("mSpeed", Mathf.Abs(rb.velocity.x));

<a href="https://i.stack.imgur.com/gL1cp.png" rel="nofollow">Animator Setup</a>

Answer1:

Figured out what to do instead of using left animation, I just used the Sprite Render to Flip.X when the "A" key is pressed. And it works!

Recommend

  • The source attachment does not contain the source for the file SQLiteOpenHelper.class
  • Unable to execute dex: Multiple dex files define Lcom/nineoldandroids/animation/Animator$AnimatorLis
  • Android MediaPlayer chopping in background
  • UIKit Dynamics in a Custom Segue
  • Image is not moving completely to the left
  • libGDX - TextureRegion drawing weird when scaled
  • Matplotlib funcanimation blit slow
  • Bootstrap 4: Stop collapse from pushing content down
  • Can you stream from a HTTPS server using HLS?
  • Appcompat-v7 conflict in android
  • Android animation while switching imageview resource
  • All bodies have rigidbody 2d and boxcollider2d and there's no collision
  • RewriteCond and RewriteRule in .htaccess
  • Visual Studio extension: Change the hint path of an assembly reference
  • JUnit testing package private class in Maven formatted project
  • Date format change angular 2
  • HTML5 canvas draw multiple rectangles that move in the canvas
  • Difficult to stop infinite CSS animation in Android browser
  • Translate animation to correct position in Android
  • Visual studio 2015 keystroke with mouse button
  • It is possible use the same sql azure instance from two different cloud service of two different sub
  • Validate jQuery plugin, field not required
  • Clear fused location provider's location for testing
  • Trying to get the char code of ENTER key
  • How to make JSON.NET deserialize to Microsoft Date Time?
  • Using Sax parsing to edit and write XML in VB6
  • Debug.DrawLine not showing in the GameView
  • Yii2: Config params vs. const/define
  • Why value captured by reference in lambda is broken? [duplicate]
  • Javascript simulate pressing enter in input box
  • When should I choose bucket sort over other sorting algorithms?
  • Importing jscolor library in angular 2
  • Jquery - Jquery Wysiwyg return html as a string
  • SVN: Merging two branches together
  • A cron job substitute?
  • ExecuteAsync RestSharp to allow backgroundWorker CancellationPending c#
  • How to CLICK on IE download dialog box i.e.(Open, Save, Save As…)
  • How can I remove ASP.NET Designer.cs files?
  • Append folder name and increment by 1 using batch script
  • java string with new operator and a literal