playMaker

Author Topic: Slingshot like mechanism  (Read 2003 times)

Budde88

  • Full Member
  • ***
  • Posts: 161
    • View Profile
Slingshot like mechanism
« on: August 10, 2015, 11:53:56 AM »
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: 161
    • View Profile
Re: Slingshot like mechanism
« Reply #1 on: August 10, 2015, 03:24:38 PM »
Maybe someone can tell me how to record the distance after I press an object?

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 2260
    • View Profile
    • jinxtergames
Re: Slingshot like mechanism
« Reply #2 on: August 11, 2015, 07: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, 07:10:15 AM by djaydino »

sebaslive

  • Hero Member
  • *****
  • Posts: 539
    • View Profile
    • Frame Tale Studios
Re: Slingshot like mechanism
« Reply #3 on: August 11, 2015, 10:03:05 AM »
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: 161
    • View Profile
Re: Slingshot like mechanism
« Reply #4 on: August 11, 2015, 04: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: 539
    • View Profile
    • Frame Tale Studios
Re: Slingshot like mechanism
« Reply #5 on: August 11, 2015, 04: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: 161
    • View Profile
Re: Slingshot like mechanism
« Reply #6 on: August 12, 2015, 07: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: 161
    • View Profile
Re: Slingshot like mechanism
« Reply #7 on: August 15, 2015, 01: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!