playMaker

Author Topic: PM JoyStik Package  (Read 13499 times)

mickman

  • Junior Playmaker
  • **
  • Posts: 62
PM JoyStik Package
« on: October 24, 2012, 04:31:17 PM »
Hi,

 Just wondering if anyone has used the PM  MobileJoyStick package on a 3rd person controller & if so how did you hook it up ?

  My current Setup goes something like this:  
 
Actions:
  On the LeftPad = "Joystick Bridge" action
     (with Game Object set to "User Owner" but maybe that needs to be set to my character controller ? )

 On the actual character I have the following actions:  
   1.) - Get Axis Vector
   2.) - Controller Simple Move

 Is this correct  or should I be using different actions ?

I'm looking over the "build 3rd person controller" video tutorial... hope this makes things a little clearer.

 OK, so I also notice there's no definition for the "JoyStick Bridge " in the online PM Manual under input Actions  ( requires an update)

   Mick
« Last Edit: October 25, 2012, 10:50:09 AM by mickman »

mickman

  • Junior Playmaker
  • **
  • Posts: 62
Re: PM JoyStik Package
« Reply #1 on: October 27, 2012, 03:59:09 PM »
anyone ??

derkoi

  • Full Member
  • ***
  • Posts: 187
Re: PM JoyStik Package
« Reply #2 on: October 28, 2012, 05:17:33 AM »
I use virtual control suite for my joysticks, the developer made some changes for me that makes setting it up with playmaker easy.  ;D Those changes are in the latest version.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: PM JoyStik Package
« Reply #3 on: October 29, 2012, 01:32:06 AM »
Hi,

The joystick bridge is not an official playmaker action, so it will not feature in the official online help.

Allow me few days, I'll come up with a working sample.

bye,

 Jean

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: PM JoyStik Package
« Reply #4 on: October 29, 2012, 02:26:08 AM »
Done it actually :)

 Basically the only required modifications is to remove the "Get Axis Vector", get the horizontal and vertical values form the joystick and inject them in the "move" vector3. And that's it.

 Have a look, I have attached a working sample based on simpleMoveController sample from PlayMaker.


bye,

 Jean

mickman

  • Junior Playmaker
  • **
  • Posts: 62
Re: PM JoyStik Package
« Reply #5 on: October 29, 2012, 09:55:58 AM »
Great ...   WOw that was close, I was about to fork out some hard earned cash to buy into a 3rd party joystick asset.  (but thought I'd check my post one last time )

  Thanks a million Jean .. I'll see if I can hook it up to my character now. 

 

Uladzimir

  • Playmaker Newbie
  • *
  • Posts: 14
Re: PM JoyStik Package
« Reply #6 on: October 29, 2012, 10:16:24 AM »
Thank you so much!!!! How to realize a jump on joystick in PlayMaker?

mickman

  • Junior Playmaker
  • **
  • Posts: 62
Re: PM JoyStik Package
« Reply #7 on: October 29, 2012, 11:03:59 AM »
This PM video tutorial will help you understand jump actions.



you will need to add the following actions"Animate Float" &  "Set Position"
Also create a float variable & call it "height"  
« Last Edit: October 29, 2012, 12:23:57 PM by mickman »

mickman

  • Junior Playmaker
  • **
  • Posts: 62
walk cycle, & random idle states
« Reply #8 on: October 29, 2012, 11:19:19 AM »
 I'm about to try to add animation walk & idle states + character look in direction of movement.
I believe if I use a "Set Animation Speed" action .. I won't require a run animation.. yes ?
Might look a bit funky though as run animation take a longer stride.


BTW.. this is an AR Scene so no camera look required.  

« Last Edit: October 29, 2012, 11:28:51 AM by mickman »

Uladzimir

  • Playmaker Newbie
  • *
  • Posts: 14
Re: PM JoyStik Package
« Reply #9 on: October 29, 2012, 12:42:32 PM »
Using the keyboard, my character jumps through such FSM:


To jump on iPad, I made ​​the following FSM:


But the jump is not working.
If I put this scheme play sound or animation - they work, but a Jump - no.
Not to understand what I did wrong  ???
« Last Edit: October 29, 2012, 12:45:29 PM by Uladzimir »

mickman

  • Junior Playmaker
  • **
  • Posts: 62
Re: PM JoyStik Package
« Reply #10 on: October 29, 2012, 03:38:24 PM »
Did you watch the video ?    

& use an "Animate Float"  &  "Set Position"  Actions.
« Last Edit: October 29, 2012, 03:44:29 PM by mickman »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: PM JoyStik Package
« Reply #11 on: October 30, 2012, 03:50:50 AM »
Hi,

 I made two working jump samples, have a look at them, they are likely holding answers for you.

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

http://hutonggames.com/playmakerforum/index.php?topic=2267.msg10191#msg10191

bye,

 Jean

mickman

  • Junior Playmaker
  • **
  • Posts: 62
Re: PM JoyStik Package
« Reply #12 on: October 30, 2012, 07:21:38 AM »
Thanks for the samples Jean.. really appreciated.   
 I loaded the Unity Robot Scene into a new project.  Getting 26 errors relating to camera and a missing Action  "SetAnimationWrapMode "  I can see SetAnimationWrapMode.cs in the project window & tried to load it into the folder Assets/PlayMaker/Actions    but it still will not recognise it.

  hhhmmm...??

 

« Last Edit: October 30, 2012, 08:17:33 AM by mickman »

Uladzimir

  • Playmaker Newbie
  • *
  • Posts: 14
Re: PM JoyStik Package
« Reply #13 on: October 30, 2012, 11:29:29 AM »
Many thanks for the good examples. Everything works fine.

But I did not get to realize character jump with a joystick for IOS.
I'm doing a platformer with moving platforms.
My character uses a standard script - CharacterMotor.

If you use this option( ),
then the character after the jump to become uncontrollable and falls through the platfom down

In this variant the robot does not jump - capsule stays in place -
the animation is played:
http://hutonggames.com/playmakerforum/index.php?topic=2267.msg10191#msg10191

this option to jump and I took advantage of the keyboard
http://hutonggames.com/playmakerforum/index.php?topic=1951.0
, everything works perfect

... but how to make the jump CharacterMotor joystick?

mickman

  • Junior Playmaker
  • **
  • Posts: 62
Re: PM JoyStik Package
« Reply #14 on: October 30, 2012, 11:56:22 AM »
Uldazimir  wrote  " if you use this option( ),
then the character after the jump to become uncontrollable and falls through the platfom down "

You need to make sure the  "Animate Float " action    spline curve is above your ground.  Notice in the video, he lifts the curve up to the correct height.