[SOLVED] How can I set up a touch-based Slingshot?

IMakeGamesLikeThisIMakeGamesLikeThis Beaverton, OregonMember Posts: 64
edited July 2014 in Working with GS (PC)

I have this ball that I want to be launched like a slingshot when you take your finger off the ball. I have it set up so that as long as your finger is on the ball, its x and y coordinates are constrained to the x and y coordinates of your finger, so I can move the ball, but I don't know how to launch it when you release your finger. Any help is appreciated.

Comments

  • SocksSocks London, UK.Member Posts: 12,822
    edited July 2014

    When you release the ball - find the vector to angle of the [release position / start position], and also find the magnitude of the [release position / start position] . . . and shoot the ball actor off at that angle, setting its speed to some multiple of the magnitude.

    You could stick it all into a Change Velocity behaviour.

    Me make you demo . . . .

  • IMakeGamesLikeThisIMakeGamesLikeThis Beaverton, OregonMember Posts: 64

    @Socks Thanks for your fast answer! I'll give that a try. I get back to you.

  • SocksSocks London, UK.Member Posts: 12,822

    Here him demo I be making for you:

    Link: https://www.mediafire.com/?ztncvvh4lqhchyo

  • SocksSocks London, UK.Member Posts: 12,822

    @IMakeGamesLikeThis said:
    Socks Thanks for your fast answer! I'll give that a try. I get back to you.

    Just noticed you are on PC, so my Mac demo might not be any use to you, hold on I'll take a screen shot of the rules - they are very simple . . . .

  • SocksSocks London, UK.Member Posts: 12,822
    edited July 2014

    Here you go . . . (the '200' is the start position, where the actor is initially placed in the scene)

  • IMakeGamesLikeThisIMakeGamesLikeThis Beaverton, OregonMember Posts: 64
    edited July 2014

    @Socks Thanks! With your first comment I was rather confused and I was about to ask you to speak English. :) Thanks for giving examples! I must say that the Mac version looks better than the PC...
    By the way, happy 5,000th post!

Sign In or Register to comment.