playMaker

Author Topic: How To Slingshot to Victory by Playmaker[SLOVED]  (Read 1573 times)

playmakertester

  • Full Member
  • ***
  • Posts: 211
How To Slingshot to Victory by Playmaker[SLOVED]
« on: August 04, 2020, 11:17:32 PM »
Hi,

Does anyone know to do same thing "Slingshot" by using only Playmaker?

Slingshot to Victory

I've looked for past posts, but I'd appreciate your advice on which Action to actually implement this in 3D.
https://hutonggames.com/playmakerforum/index.php?topic=16093.0

Past post

Thanks in advance!
« Last Edit: August 11, 2020, 03:03:24 PM by playmakertester »

ManInAShedGames

  • Playmaker Newbie
  • *
  • Posts: 37
Re: How To Slingshot to Victory by Playmaker
« Reply #1 on: August 05, 2020, 05:59:47 AM »
I have the same question.
I know there is a 'get mouse position' action. You could possibly use this to start.

Then use the getmousedelta action to calculate the drag.

Then somehow use the mouse delta to control a physics force that will build up the further you drag.
Finally, when you lift your finger, it will launch the projectile.

Just taking a guess here, i'm very intertested in getting this working, so keep me updated if you have any luck.

playmakertester

  • Full Member
  • ***
  • Posts: 211
Re: How To Slingshot to Victory by Playmaker
« Reply #2 on: August 05, 2020, 06:28:49 AM »
Hi 3dambit,

Let me try.

playmakertester

  • Full Member
  • ***
  • Posts: 211
Re: How To Slingshot to Victory by Playmaker
« Reply #3 on: August 11, 2020, 12:06:05 PM »
Hi!

I found an article that may be helpful.
However, I don't know how to read the code so I'm hoping to implement it in Playmaker.

If anyone has any advice on how to implement the code in this article with Playmaker, please let me know.

https://insights.nimblechapps.com/unity/how-to-implement-slingshot-in-unity

playmakertester

  • Full Member
  • ***
  • Posts: 211
Re: How To Slingshot to Victory by Playmaker[SLOVED]
« Reply #4 on: August 11, 2020, 03:04:06 PM »
>I have the same question.
>I know there is a 'get mouse position' action. You could possibly use this to start.

>Then use the getmousedelta action to calculate the drag.

>Then somehow use the mouse delta to control a physics force that will build up the >further you drag.
>Finally, when you lift your finger, it will launch the projectile.

>Just taking a guess here, i'm very intertested in getting this working, so keep me >updated if you have any luck.

Worked! Thanks!

ManInAShedGames

  • Playmaker Newbie
  • *
  • Posts: 37
Re: How To Slingshot to Victory by Playmaker[SLOVED]
« Reply #5 on: August 11, 2020, 03:18:13 PM »
You're kidding? Can you take a screenshot and explain how you done it? Thanks

playmakertester

  • Full Member
  • ***
  • Posts: 211
Re: How To Slingshot to Victory by Playmaker[SLOVED]
« Reply #6 on: August 11, 2020, 04:26:47 PM »
Hi,

as you told me before,

State2:I was able to make the object move with a mouse click
State3:and then add-force the difference in position between that object and the initial object to make it look like that.

I think it still needs a little bit of refinement, though.

ManInAShedGames

  • Playmaker Newbie
  • *
  • Posts: 37
Re: How To Slingshot to Victory by Playmaker[SLOVED]
« Reply #7 on: August 11, 2020, 04:44:56 PM »
Did you use[ get mouse position] in state 1 ?

playmakertester

  • Full Member
  • ***
  • Posts: 211
Re: How To Slingshot to Victory by Playmaker[SLOVED]
« Reply #8 on: August 11, 2020, 04:47:56 PM »
State1 is just below.

State1: Get mouse button down
Screen shot is state 2 & 3 :)

ManInAShedGames

  • Playmaker Newbie
  • *
  • Posts: 37
Re: How To Slingshot to Victory by Playmaker[SLOVED]
« Reply #9 on: August 11, 2020, 04:49:44 PM »
and are you using two separate objects?

playmakertester

  • Full Member
  • ***
  • Posts: 211
Re: How To Slingshot to Victory by Playmaker[SLOVED]
« Reply #10 on: August 11, 2020, 04:54:50 PM »
no, just using one object.

> difference in position between that object and the initial object to make it look like that.
This was wrong. just using the Delta for Mouse position.