[SOLVED] How can I set up a touch-based Slingshot?
IMakeGamesLikeThis
Beaverton, OregonMember Posts: 64
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
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 . . . .
@Socks Thanks for your fast answer! I'll give that a try. I get back to you.
Here him demo I be making for you:
Link: https://www.mediafire.com/?ztncvvh4lqhchyo
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 . . . .
Here you go . . . (the '200' is the start position, where the actor is initially placed in the scene)
@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!