title: Change/Flip Player Sprite direction
body: <p>currently I am working on a networked 2D platformer. I am trying to make the character always face in the direction he is walking. Therefore I am using this code: (BTW I know this is not supposed to work)</p>
  
  <pre><code>if (rigidbody.velocity.y &gt; 0) {
          transform.rotation = 0,0,0;
  } else if (rigidbody.velocity.y &lt; 0) {
          transform.rotation = 0,180,0;
  }
  </code></pre>
  
  <p>So my question would be what code would I have to use to make the character's transform's rotation be 0,0,0 when his velocity on the y axis is over zero and 0,180,0 when its under.</p>
  
  <p>Note:
  Yes I do know there are other ways of approaching this but I think this would be the ideal way in this instance and I am curious.</p>