Playmaker Forum

PlayMaker News => General Discussion => Topic started by: Handrews on July 13, 2019, 12:32:29 PM

Title: I need help with Joystick Control[SOLVED]
Post by: Handrews on July 13, 2019, 12:32:29 PM
Hi,

I'am developing a mobile game for fun, and the first i want to implement is that the character move the same as the joystick in the screen.
I'am using playmaker, but i have no idea of how to do that, any idea?

I will attach a small video so you can see where the camera, character and joystick is.
Title: Re: I need help with Joystick Control
Post by: djaydino on July 14, 2019, 08:40:02 AM
Hi.
Pls do not use all caps, you won't get help faster like this!

There was a sample scene on the Ecosystem (https://hutonggames.fogbugz.com/default.asp?W1181) that uses touch controls, but i cant seem to find it at the moment.
I asked jean if he knows where it is, but he will probably reply tomorrow.

Basically i think it gets the normalized x between the center and the current Controller position based on the maximum the controller can reach.
then if to the left it will set the normalized result to negative (you can set negative by doing 'normalized value Multiplied by -1)

This way you would get similar results as using axis actions

You would also need to get the angle But i'm not sure what would be the best way at the moment (i am not at my computer)

I think best is to wait for jean to reply (the sample should still be there, i just can't find at the moment)
I will let you know when jean replied to me.
Title: Re: I need help with Joystick Control
Post by: jeanfabre on July 15, 2019, 04:25:10 AM
Hi,

 It's back on :)

(https://i.imgur.com/eXtSQj7.gif)

http://hutonggames.com/playmakerforum/index.php?topic=10839.0

Bye,

 Jean
Title: Re: I need help with Joystick Control[SOLVED]
Post by: Handrews on July 15, 2019, 06:04:07 AM
I'm using Unity 2018.4.3f1 but i can't open it and shows a lot of errors.
Title: Re: I need help with Joystick Control[SOLVED]
Post by: djaydino on July 15, 2019, 07:26:31 AM
Hi.
Just tested on a clean 2018.4.2 project, it seems to work on my end.

Can you try re-downloading and if it still does not work try on a clean project.

If after that it still does not work, can u show the errors in the console?
Title: Re: I need help with Joystick Control[SOLVED]
Post by: jeanfabre on July 16, 2019, 03:30:33 AM
Hi,

 Can you paste the errors when you have them, it helps understanding better what could be happening.

I also tested the package and it works, so try on a fresh projects.

Bye,

 Jean
Title: Re: I need help with Joystick Control[SOLVED]
Post by: Handrews on July 16, 2019, 06:17:20 AM
It worked!! But implement a joystick is very tricky  :'(