how to move to a specific point on click without stopping

HairyMuffinManHairyMuffinMan Member Posts: 36
edited November -1 in Working with GS (Mac)
I hope to find my answer this time here.

I want the actor to point to the position of my click.

I tried this by 'mouse down' rule with the move to behavior, but the actor is not stopping at the destination!! it's keep moving off screen.
how to make him stop at destination??

Comments

  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    dont use move to, use interpolate.
  • HairyMuffinManHairyMuffinMan Member Posts: 36
    why GS is still full of illogical bugs and huge limitation like this one? I am starting to get sick of it....

    Like for example there's no option registry point for rotation, so you need to make invisible half-actor or use 100s of formula just to make it rotate around corner.

    and the Move to shouldn't be complicated like this one...duh...

    is Corona SDK better?
  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    HairyMuffinMan said:
    why GS is still full of illogical bugs and huge limitation like this one? I am starting to get sick of it....

    Like for example there's no option registry point for rotation, so you need to make invisible half-actor or use 100s of formula just to make it rotate around corner.

    and the Move to shouldn't be complicated like this one...duh...

    is Corona SDK better?

    not sure what your saying. But any questions about corona you can go to there forum and ask there.
  • HairyMuffinManHairyMuffinMan Member Posts: 36
    tshirtbooth said:
    when mouse is down
    interpolate self.rotation to vectorToAngle( game.Mouse.Position.X , game.Mouse.Position.Y )
    duration 0.2

    hope that helps

    cheers

    NEED HELP WITH YOUR PROJECT? tshirtbooth@gshelper.com $25.00/hr
    _______________________________________________________________________
    FOLLOW ME ON TWITTER
    KIDS PUZZLE TEMPLATE
    ABC FLASH CARD TEMPLATE
    STAR DAZE TEMPLATE
    Awesome Cool Menu TEMPLATE
    5 Core controle elements PART 2

    no, it didn't help. This formula doesn't make sense , why it should make it move to destination??

    I am trying to make a crane 's claw head to down on a brick to pick it up.

    but with your formula the claw head just rotate in its position, and does not move!!
  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    HairyMuffinMan said:
    no, it didn't help. This formula doesn't make sense , why it should make it move to destination??

    I am trying to make a crane 's claw head to down on a brick to pick it up.

    but with your formula the claw head just rotate in its position, and does not move!!

    thats because you have 2 different quesitons in your first post. You first say you want it to move but then you say you want it to point where you click. What tshirt told you will point where you click.

    If you want it to move to where you click have a rule when mouse button is down
    -interpolate self position x to mouse position x
    and interpolate self position y to mouse position y

    I recommend you watch all the gamesalad cookbook videos on youtube and the videos on gshelper.com

    After that you'll have a much better understanding of gamesalad
  • HairyMuffinManHairyMuffinMan Member Posts: 36
    i could make it move by using 2 interpolate moving to x and y's mouse positions.

    yet, i need to make a crane-line movement ....but i think i am figuring it out..
Sign In or Register to comment.