Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: soccergames on September 04, 2017, 09:01:46 AM

Title: Touch movement controls for phone
Post by: soccergames on September 04, 2017, 09:01:46 AM
Hi guys,

I am trying to add movement for phone mechanics similar to how "soccer stars" game does it. 
The control mechanic is you touch the ball and pull back using your finger which creates an arrow gauge, the further you pull back the more the ball will move and the direction in which you move your finger changes the direction.
(https://appsftw.com/im/a3.mzstatic.com/us/r30/Purple6/v4/2b/8c/88/2b8c88ff-7a26-afa9-4818-8b8b9eed2caf/screen406x722.jpeg)

Are there any scripts playmaker has that are similar to this?

Thanks!
Title: Re: Touch movement controls for phone
Post by: tcmeric on September 04, 2017, 12:13:45 PM
There is no one action for this, however it could be made with playmaker. I may be putting together a 2d/ 2.5d tutorial for something similar soon.

Are you familiar with touch events?

Basically you need to use a touch event to see if you are touching the ball. Then get the direction between the ball and your finger. Then apply force in the opposite direction. Anyways, if you can wait a few days, it should be mostly covered in my tutorial video  8)