Questions about dragging an actor?

stackpoolestackpoole Melbourne, Victoria, AustraliaMember, PRO Posts: 473
edited July 2012 in Working with GS (Mac)
HI,

Just wondering how you can drag and actor wherever ?

Thanks for any help!

Sydney Swans 2014!!

Best Answer

Answers

  • stackpoolestackpoole Melbourne, Victoria, AustraliaMember, PRO Posts: 473
    hey there

    when touch is pressed
    constrain attribute self.position.x to mouse.position.x
    constrain attribute self.position.y to mouse.position.y

    hope that helps

    cheers
    Yes, thanks

    Just wondering though ( i know its not in the original question) but could you do something like,

    you can drag it by dragging the middle of the actor
    but if you drag the edges, it rotates?

    thx.. hope you know whwat I mean

    Sydney Swans 2014!!

Sign In or Register to comment.