Playmaker Forum

PlayMaker Help & Tips => iOS Help => Topic started by: Budde88 on August 10, 2015, 02:53:56 PM

Title: Slingshot like mechanism
Post by: Budde88 on August 10, 2015, 02:53:56 PM
I know this has been asked on 4 or 5 deifferent posts already, but the answers were all pointing to a playmaker slingshot package which is just dreadful. Basically what I need is explained in the attached image.

Hope that there is someone out there who can help me out with how to put this together. Even a step by step would be great
Title: Re: Slingshot like mechanism
Post by: Budde88 on August 10, 2015, 06:24:38 PM
Maybe someone can tell me how to record the distance after I press an object?
Title: Re: Slingshot like mechanism
Post by: djaydino on August 11, 2015, 10:08:37 AM
Hi,
do you mean the distance you moved you positions after pressed?
If so maybe do this :

on press get your position, then on release get the position again but save in a different variable.
Then then use a "float operator" to to get the difference

you can also do this while holding and use every frame instead of "on release"
Title: Re: Slingshot like mechanism
Post by: sebaslive on August 11, 2015, 01:03:05 PM
You can also use the action, get distance
Title: Re: Slingshot like mechanism
Post by: Budde88 on August 11, 2015, 07:25:11 PM
Hey Guys, I'm really struggling with this concept. It needs to be done in 2D and I feel like I just don't have much choice with the mouse pick and storing Vector 2 info. I need it for touch as well. But it seems like the Touch actions allow you to store a hit point in 2D where the mouse does not. If anyone knows how to do this please, I'm begging here, help me out with each state and how this whole thing should be set up.
Title: Re: Slingshot like mechanism
Post by: sebaslive on August 11, 2015, 07:32:58 PM
I haven't done a slingshot before but if you have the package, you can dissect that and see how to make it better fit what you need, or talk to the creator of the package for help. If not, keep bumping and I hope someone can help out.
Title: Re: Slingshot like mechanism
Post by: Budde88 on August 12, 2015, 10:30:15 AM
The package is just not up to par to be honest. It's mechanics are broken. So it would be a waste trying to incorporate it's setup. Really hope someone out there can help me out.
Title: Re: Slingshot like mechanism
Post by: Budde88 on August 15, 2015, 04:28:38 PM
Ok I tried to download and check out that package again, I updated it and it works!!!
BUT... all the script is for 3D Objects, and I need them in 2D :( I thought Playmaker came with a slingshot package as well?  I really need help guys!