playMaker

Author Topic: How To Move 3D Object With Touch Dragging Finger by Playmaker[SLOVED]  (Read 2203 times)

playmakertester

  • Full Member
  • ***
  • Posts: 211
Hi,

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

Tutorial How To Move 3D Object With Touch Dragging Finger By The Screen In Android Unity Game

I searched several article but can not find solution.

Best,
« Last Edit: October 09, 2020, 05:23:42 PM by playmakertester »

ManInAShedGames

  • Playmaker Newbie
  • *
  • Posts: 37
Re: How To Move 3D Object With Touch Dragging Finger by Playmaker
« Reply #1 on: August 04, 2020, 02:29:15 PM »
here's one way.

First state should have a {touch event}action.
(Waits for finger to be placed on screen)

Second state should have a {Get mouse delta position} action
This action calculates how far from the original touch point you have dragged.
Create a variable for the delta x and a variable for the delta y.

Now in the same state create a {translate} action
Now simply drive the x translate and y translate with your variables from the delta mouse position.

you may want to put each variable through a float multiply depending on your situation.
Finally in the same state, create a {mouse button up} action for when you lift your finger,and send it back to state 1, ready for more input.
The getmousedeltaposition action can be found on the ecosystem.


I hope that gets you by, if it's not working for you then i may have forgotten something, as i had this very issue for the last few days, but since , i got it working perfectly with several prototypes. I can send screenshots etc if you are still stuck.
The answers to this problem are indeed on the playmaker forum, but it's a little scattered and tricky to find.

Jason



playmakertester

  • Full Member
  • ***
  • Posts: 211
Re: How To Move 3D Object With Touch Dragging Finger by Playmaker
« Reply #2 on: August 04, 2020, 04:11:13 PM »
Hi 3dambit,

Thanks for detail explained. I'll try.

>The getmousedeltaposition action can be found on the ecosystem.
Is this mean this page?
https://hutonggames.com/playmakerforum/index.php?topic=1045.0

ManInAShedGames

  • Playmaker Newbie
  • *
  • Posts: 37
Re: How To Move 3D Object With Touch Dragging Finger by Playmaker
« Reply #3 on: August 04, 2020, 04:46:47 PM »
No, the ecosystem is a part of playmaker.
click on the playmaker tab inside unity at top of screen, then add ons, then you should see ecosystem. Its like a little program by itself, where you can search for different actions. If you type 'get mouse delta'  into the search then it should pop up. Then you simply download the action, and it will pop up inside your playmaker actions list.
https://hutonggames.fogbugz.com/?W1181
« Last Edit: August 04, 2020, 04:50:27 PM by 3dambit »

ManInAShedGames

  • Playmaker Newbie
  • *
  • Posts: 37
Re: How To Move 3D Object With Touch Dragging Finger by Playmaker
« Reply #4 on: August 04, 2020, 06:36:55 PM »
You must download the ecosystem.
I forgot.

playmakertester

  • Full Member
  • ***
  • Posts: 211
Re: How To Move 3D Object With Touch Dragging Finger by Playmaker
« Reply #5 on: August 04, 2020, 10:29:57 PM »
Hi 3dambit,

Thanks for sharing! let me try.

playmakertester

  • Full Member
  • ***
  • Posts: 211
Re: How To Move 3D Object With Touch Dragging Finger by Playmaker
« Reply #6 on: August 04, 2020, 11:04:43 PM »
Hi 3dambit,

It worked! Thanks :)

Question,

"Touch Event" on PC, is this work on mobile when build?
I used "Get Mouse Button Down" instead on test PC

playmakertester

  • Full Member
  • ***
  • Posts: 211
Re: How To Move 3D Object With Touch Dragging Finger by Playmaker
« Reply #7 on: August 05, 2020, 03:12:49 AM »
>"Touch Event" on PC, is this work on mobile when build?
>I used "Get Mouse Button Down" instead on test PC

it worked!

ManInAShedGames

  • Playmaker Newbie
  • *
  • Posts: 37
Re: How To Move 3D Object With Touch Dragging Finger by Playmaker
« Reply #8 on: August 05, 2020, 03:30:54 AM »
Yes, touch event responds to touches on touch devices. You can use both at the same time, so you can test on pc . Also, if you get 'unity remote' from the app store and install it on your touch device,  connect your device with a cable to computer, you can test the touch control live when you press play in unity

https://docs.unity3d.com/560/Documentation/Manual/UnityRemote5.html

playmakertester

  • Full Member
  • ***
  • Posts: 211
Re: How To Move 3D Object With Touch Dragging Finger by Playmaker
« Reply #9 on: August 05, 2020, 06:35:53 AM »
>Yes, touch event responds to touches on touch devices. You can use both at the same time, so you can test on pc .

Thanks 3dambit!

>Also, if you get 'unity remote' from the app store and install it on your touch device,  connect your device with a cable to computer, you can test the touch control live when you press play in unity

Got it, let me try!