Search Unity

Making Character Slidesideways then back on Buttonclick

Discussion in 'Scripting' started by byro210, Jul 24, 2014.

  1. byro210

    byro210

    Joined:
    Feb 18, 2014
    Posts:
    121
    Im using JavaScript, and ive got my code fine when you click Attack it hurts the monster depending on your status but I wish to know how I can make the picture of the character slide right on the screen then back a little bit when attack is clicked. its just a stickman so I don't need the animation moving just to slide left to right. Would anyone be able to point me in the right direction

    Please and Thankyou In Advance.
     
  2. infinitypbr

    infinitypbr

    Joined:
    Nov 28, 2012
    Posts:
    3,149
    transform.position seems to be the way to go, but maybe you could provide a screenshot showing what you mean by "picture of the character"?