Rotate with a button

cartercarter Member Posts: 133
edited November -1 in Working with GS (Mac)
i have a game going where I need to rotate an actor with a button. You press the button for right and it goes from straight (horizontal) to 45 degree angle right. The same goes for left. How would I go about this

Comments

  • AfterBurnettAfterBurnett Member Posts: 3,474
    Use the "rotate to" behaviour. So your actor buttons would have something like this: "when touch is pressed, rotate to (whatever angle you want)"

    OR you could interpolate the rotation.
  • cartercarter Member Posts: 133
    OK when I do this it rotates one way but not the other
    any solutions?
    Thanks
  • AfterBurnettAfterBurnett Member Posts: 3,474
    If you want it to rotate left, use negative numbers: rotate e.g. "-45.0". I'm not in front of GS right now but I'm pretty sure that's how it works ;-)
  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    POLYGAMe said:
    If you want it to rotate left, use negative numbers: rotate e.g. "-45.0". I'm not in front of GS right now but I'm pretty sure that's how it works ;-)

    im not on my mac either but im like 99% sure your right. I think the center is zero so right would be positive and left negative numbers. Also on the regular rotate behavior there clockwise and couter clockwise but cant remember if its the same for rotate too lol
  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
    Tis right; I've just done a little test to remind myself that it works! :-)

    ""You are in a maze of twisty passages, all alike." - Zork        temp domain http://spidergriffin.wix.com/alphaghostapps

  • AfterBurnettAfterBurnett Member Posts: 3,474
    I knew I was right. I'm amazing ;-)
  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    POLYGAMe said:
    I knew I was right. I'm amazing ;-)

    cyber pat on the back! haha
Sign In or Register to comment.