Simply touch screen to move actor

921creative921creative Member, PRO Posts: 140
edited November -1 in Working with GS (Mac)
What is the simplest way to have your actor move towards a position touched on the screen? I don't want joystick controls, I want the user to be able to simply tap anywhere on the screen and have my actor move towards that position. Thanks.

Comments

  • 921creative921creative Member, PRO Posts: 140
    Any ideas? Please? :)
  • OctappusOctappus Member Posts: 68
    I've never done this myself, but I would try the 'Interpolate' behaviour first.

    Something like:

    Rule: Actor receives event ... mouse button ... is down

    Behaviour: Interpolate Attribute ... self.Position.X ... To ... game.Mouse.Position.X

    . . . and the same for the Y attribute
Sign In or Register to comment.