playMaker

Author Topic: Thumbstick Control  (Read 8562 times)

gamedivision

  • Full Member
  • ***
  • Posts: 227
Thumbstick Control
« on: May 21, 2012, 01:38:33 PM »
has anyone made a thumbstick controller they'd like to share,ive seen the dual joystick controller,but id need something along the lines of 1 stick controlling a character


thanks
« Last Edit: May 21, 2012, 01:48:56 PM by gamedivision »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Thumbstick Control
« Reply #1 on: May 22, 2012, 12:51:18 AM »
Hi,

 Do you mean you would like to have more then two axis for the joystick? the dual joystick is made up of two distinct single joysticks, so simple delete one of them. I might misunderstand what you are after tho.

 If you need extra controls around the joystick, then I haven't come any open source examples even in standard Unity,

 Bye,

 Jean

gamedivision

  • Full Member
  • ***
  • Posts: 227
Re: Thumbstick Control
« Reply #2 on: May 22, 2012, 04:58:17 AM »
No just a standard joystick that will move a character,my problem is understanding how to connect the joystick to the character.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Thumbstick Control
« Reply #3 on: May 22, 2012, 06:02:06 AM »
Hi,

 how do you control the character? I mean do you have a controller currently attached to the player or do you actually want to build it yourself?

 Bye,

 Jean

gamedivision

  • Full Member
  • ***
  • Posts: 227
Re: Thumbstick Control
« Reply #4 on: May 22, 2012, 07:30:14 AM »
just using a joystick on the screen to the left,then a jump and fire button on the right,i have the joystick thats ok i have the character controller, its joining the joystick with the character controller is what i dont understand how to do.
when i push forward my character moves forward,ive seen the animation tutorials the touch tutorials,its making that joystick work with my character on the iphone screen.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Thumbstick Control
« Reply #5 on: May 22, 2012, 02:34:43 PM »
Hi,

 The problem with the standard controller is that it accepts Inputs as the one defined in the Input Manager, that is joystick, keyboards and mouse inputs. I do think this is a very bad system, as not only it doesn't let you take in account even basic touch events, but on to pof that it doesn't let you work with with script...

 So, we are left with three variants:

1: you want to keep this controller. you will have to edit the controller to accept other inputs, this is trivial infact, you simply need tweak the code where it checks for input and add on top of it a variable, which would be tight to the joystick outputs.

2: You download the penelope tutorial and use the controller defined in there, you have a great range of possibilities, as they give you three type of controller: Camera relative, player relative or tap control.

3: You are allergic to scripts, then you will have to code the character controller all in playmaker. This is totally feasible, but will definitely be a big task.

Bye,

 Jean

gamedivision

  • Full Member
  • ***
  • Posts: 227
Re: Thumbstick Control
« Reply #6 on: May 22, 2012, 03:28:13 PM »
couldnt i use the 3rd person controller for ios prefab,and let let playmaker communicate with that prefab

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Thumbstick Control
« Reply #7 on: May 23, 2012, 01:17:40 AM »
Hi,

This is them ones actually, the penelope tutorial is just nicer to play with, but it's the same base.

It's kind of tricky to "let" playmaker communicate with components especially in this case, where them controllers expect a "joystick" class as there input sources. By tricky I mean without scripting a bit. the solution can be to simply modify the controller and expose the various inputs as "float", like left, right, forward backward, jump, etc. and then playmaker can access that using the action "set property".

 So in your case, you want actual buttons to jump and fire, where the unity standard controllers jump on double tap and have no fire command. So anyway, you will need to modify the controllers or add new controllers on top of it.

 Bye,

 Jean



gamedivision

  • Full Member
  • ***
  • Posts: 227
Re: Thumbstick Control
« Reply #8 on: May 23, 2012, 03:43:08 PM »
yeah some other major issues ive just worked out.
you cant batch unity gui elements,so that means a 3rd party gui program which will only have 1 draw call for all gui elements,and its getting playmaker to communicate with those elements.
so for instance like the joystick to get playmaker to control the x and y co-ordinates and then score as well,
its a bigger job than i thought,ohh well forget modelling and texturing for the next couple of weeks,its time to dig deep.

gamedivision

  • Full Member
  • ***
  • Posts: 227
Re: Thumbstick Control
« Reply #9 on: May 23, 2012, 05:53:12 PM »
i dont know why i dont think sometimes,i can create a simple plane in a 3d program import the 1 plane put as many planes as i need to cover my display on screen add the textures then batch them all together only creating 1 draw call,that way the buttons and control stick are clean of any scripts ready for playmaker

gamedivision

  • Full Member
  • ***
  • Posts: 227
Re: Thumbstick Control
« Reply #10 on: May 26, 2012, 12:05:18 PM »
so does anyone have any real idea how to build a thumbstick from scratch in playmaker,some pointers would be great


thanks