Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: mickman on October 24, 2012, 04:31:17 PM

Title: PM JoyStik Package
Post by: mickman 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
Title: Re: PM JoyStik Package
Post by: mickman on October 27, 2012, 03:59:09 PM
anyone ??
Title: Re: PM JoyStik Package
Post by: derkoi 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.
Title: Re: PM JoyStik Package
Post by: jeanfabre 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
Title: Re: PM JoyStik Package
Post by: jeanfabre 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
Title: Re: PM JoyStik Package
Post by: mickman 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. 

 
Title: Re: PM JoyStik Package
Post by: Uladzimir on October 29, 2012, 10:16:24 AM
Thank you so much!!!! How to realize a jump on joystick in PlayMaker?
Title: Re: PM JoyStik Package
Post by: mickman 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"  
Title: walk cycle, & random idle states
Post by: mickman 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.  

Title: Re: PM JoyStik Package
Post by: Uladzimir on October 29, 2012, 12:42:32 PM
Using the keyboard, my character jumps through such FSM:
(http://www.dropmocks.com/iBmJqZ)

To jump on iPad, I made ​​the following FSM:
(http://www.dropmocks.com/iBmJaj)

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  ???
Title: Re: PM JoyStik Package
Post by: mickman on October 29, 2012, 03:38:24 PM
Did you watch the video ?    

& use an "Animate Float"  &  "Set Position"  Actions.
Title: Re: PM JoyStik Package
Post by: jeanfabre 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=1951.0)

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

bye,

 Jean
Title: Re: PM JoyStik Package
Post by: mickman 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...??

 

Title: Re: PM JoyStik Package
Post by: Uladzimir 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?
Title: Re: PM JoyStik Package
Post by: mickman 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.

Title: Re: PM JoyStik Package
Post by: jeanfabre on October 30, 2012, 12:19:50 PM
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...??

 



Hi, I tested on a fresh project latest version of playmaker and the package and all is well, not sure what's happening on your end unfortunatly.

bye,

 Jean
Title: Re: PM JoyStik Package
Post by: Uladzimir on October 30, 2012, 12:23:27 PM

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.


Actually, the character fell through because of irregular curve

I'll try to work on this option

Many thanks for your help!!
Title: Re: PM JoyStik Package
Post by: vidi on July 27, 2013, 08:46:34 AM
Is there are working examples that describe how joystick work with playmaker
if I downloaded this example(* ControllerSimpleMoveMobileJoystick.unitypackage) and play not happens and I get this warning.
Quote
Assets/Scripts/Joystick.js(62,20): BCW0012: WARNING: 'UnityEngine.GameObject.active' is obsolete. GameObject.active is obsolete. Use GameObject.SetActive(), GameObject.activeSelf or GameObject.activeInHierarchy.
Title: Re: PM JoyStik Package
Post by: jeanfabre on July 29, 2013, 10:24:16 AM
Hi,

 I am a bit confused, I am running this package on a clean project in Unity 4.2 and there is no Joystick.cs in that package actually. Can you try on a fresh project again?

else, what package did you install as well? I believe joystick is a unity script, so maybe you need to update your packages if you moved from a 3x project to a 4x project.

bye,

 Jean
Title: Re: JoyStik Package
Post by: play_edu on July 30, 2013, 05:35:43 AM
Thanks for the samples Jean
Title: Re: PM JoyStik Package
Post by: ETGgames on July 21, 2015, 06:51:24 AM
The one you posted jean doesn't even work....
Title: Re: PM JoyStik Package
Post by: Lane on July 21, 2015, 07:25:39 AM
Hi ETGames,

Please be more specific. What are you trying to do, exactly, and how does the linked package not solve it?