playMaker

Author Topic: Slingshot like mechanism  (Read 4963 times)

Budde88

  • Full Member
  • ***
  • Posts: 165
Slingshot like mechanism
« 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

Budde88

  • Full Member
  • ***
  • Posts: 165
Re: Slingshot like mechanism
« Reply #1 on: August 10, 2015, 06:24:38 PM »
Maybe someone can tell me how to record the distance after I press an object?

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7615
    • jinxtergames
Re: Slingshot like mechanism
« Reply #2 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"
« Last Edit: August 11, 2015, 10:10:15 AM by djaydino »

sebaslive

  • Hero Member
  • *****
  • Posts: 572
    • Frame Tale Studios
Re: Slingshot like mechanism
« Reply #3 on: August 11, 2015, 01:03:05 PM »
You can also use the action, get distance
All my VR games use Steam VR Playmaker Toolkit: http://u3d.as/u20
And Oculus Touch Playmaker Toolkit: http://u3d.as/QT5


Follow me @sebasRez

Budde88

  • Full Member
  • ***
  • Posts: 165
Re: Slingshot like mechanism
« Reply #4 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.

sebaslive

  • Hero Member
  • *****
  • Posts: 572
    • Frame Tale Studios
Re: Slingshot like mechanism
« Reply #5 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.
All my VR games use Steam VR Playmaker Toolkit: http://u3d.as/u20
And Oculus Touch Playmaker Toolkit: http://u3d.as/QT5


Follow me @sebasRez

Budde88

  • Full Member
  • ***
  • Posts: 165
Re: Slingshot like mechanism
« Reply #6 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.

Budde88

  • Full Member
  • ***
  • Posts: 165
Re: Slingshot like mechanism
« Reply #7 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!