playMaker

Author Topic: IOS Gameboy-like Character Controls  (Read 5055 times)

threedavid

  • Playmaker Newbie
  • *
  • Posts: 18
    • View Profile
IOS Gameboy-like Character Controls
« on: January 22, 2013, 04:29:54 PM »
Hi,
I would love to get some help or feedback on how best to proceed with my character test. What I done so far is I've set up Texture GUI buttons that mimic the early Gameboy device onto my iPhone screen in Landscape Left orientation. You know, on the left side, the up/down/left/right arrow butttons, and on the right side, the "A" and "B" buttons. Also, I've created a test character with idle/walk/jump/crouch animations and have named the exported .fbx files properly that Unity wants.

The next step is to set up the control system with Playmaker and I'm a little confused about what's the best way to go about it. I've seen the Animation Graph videos with the Construction worker, but they seem a little old and it doesn't cover how to set up the Texture GUI buttons as the controls. I've also viewed the Smooth Moves video, but again, not so much for IOS purposes. All the others I've viewed, the joystick movements don't seem to help either.

Any suggestions would be greatly appreciated and I would be happy to share a step-by-step how-to once I've figured this out for myself. If anyone is willing to speak by skype or phone, you can get my info from my professional site www.3david.com. My skype account is threedavid.

Best,
David

threedavid

  • Playmaker Newbie
  • *
  • Posts: 18
    • View Profile
Re: IOS Gameboy-like Character Controls
« Reply #1 on: January 23, 2013, 02:20:37 PM »
So, what I've tried so far is I followed the Animation Graph 1 and 2 video which is great if it's for a PC, but I'm trying to get it to work for IOS Touch GUI event arrow buttons so, I followed the Touch GUI video which is great for a giant die object, but not so much for a character, but anyways, it didn't work.

I tried creating the exact FSM config for both set ups. It works fine with the arrow keys on the keyboard or the WSAD keys. There has got to be a way to set up the Touch GUI arrow buttons to control the character like the arrow keys on the keyboard.

Anyone?

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 12417
  • Official Playmaker Support
    • View Profile

threedavid

  • Playmaker Newbie
  • *
  • Posts: 18
    • View Profile
Re: IOS Gameboy-like Character Controls
« Reply #3 on: January 24, 2013, 10:37:18 AM »
As usual, thanks Jean. I will take a look and try to apply it to my character. If I ever have a chance to meet you the first several beers are on me.

threedavid

  • Playmaker Newbie
  • *
  • Posts: 18
    • View Profile
Re: IOS Gameboy-like Character Controls
« Reply #4 on: January 24, 2013, 07:03:50 PM »
Hi Jean,
I'm following along your controllersimplemovemobiletouch and have gotten to the point of setting up the jump button and in the "set property" button you've got the "character motor" to show up in the Object Type to show up. It's greyed out. How did you get that to show. Mine just shows UnityEngine Game Object and so it won't give me the "inputJump" option for the Property section.

David

threedavid

  • Playmaker Newbie
  • *
  • Posts: 18
    • View Profile
Re: IOS Gameboy-like Character Controls
« Reply #5 on: January 25, 2013, 03:58:43 PM »
Hi Jean,
Other then the jump issue (above), I've got the character moving around, but the animation is stuck on only the idle motion. It won't switch to the walking motion when the character is moving around.

On the idle state, there is the Float Compare action following the Animation Graph video tutorial where if moveSPeed is greater than 0 then walking is set. And on the walk state there is Float Compare where if moveSpeed is equal or less then 0 then idle is set.

The character is parented to the capsule where all the actions and its settings from your controllersimplemove mobiletouch are in place.

I just don't know why the motions aren't triggering back and forth when the character is moving and stopping. I only have the two motions, idle and walk for movement.

Any ideas? or I would be happy to share out my desktop through skype if that will help solve this.

Thanks,
David

threedavid

  • Playmaker Newbie
  • *
  • Posts: 18
    • View Profile
Re: IOS Gameboy-like Character Controls
« Reply #6 on: January 26, 2013, 01:40:52 PM »
Thanks Alex for that one tip about Locking an FSM. That was really helpful. For the forum, Alex mentioned that you can Lock an FSM so that you can select a Unity component and drag it into an action cause as you all know, when you select things like in the scene selections in Playmaker disappears. So the Lock button is located about the mid-section, top row of the Playmaker Editor.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 12417
  • Official Playmaker Support
    • View Profile
Re: IOS Gameboy-like Character Controls
« Reply #7 on: January 27, 2013, 11:15:08 PM »
Hi,

 I recommend you split your problem.

-- Can each animation be triggered properly?
-- is the float representing the speed correct and behaving like it should?

bye,

 Jean

threedavid

  • Playmaker Newbie
  • *
  • Posts: 18
    • View Profile
Re: IOS Gameboy-like Character Controls
« Reply #8 on: January 27, 2013, 11:35:42 PM »
Hey Jean,

The speed looks good and behaving like it should and the animation clips are good as well. The character is moving around like it should. If I may request something. Your ControllersimpleMoveMobileTouch.unitypackage is awesome and a great source, would you be willing to take it a bit further and use the Construction Guy character that comes with the Standard Package in Unity and attach him to the Cylinder you use as the "Character"?

The Animation Graph 2 video uses the Get Axis Vector action and you use the Get FSM Float actions. Right now, when I push this set up to my iPhone, my character is moving around the way it should, but the motions are not triggering at all and the jump doesn't work even though I set up exactly the way you have it (double checked and triple checked).

I've re-prepped my characters animation like the Construction Guy where all the motions are collected into one export and then clipped out in Unity based on start and end frames of each motion - idle, walk, jumpUp, jumpDown, crouchDown, crouchUp.

Best,

David

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 12417
  • Official Playmaker Support
    • View Profile
Re: IOS Gameboy-like Character Controls
« Reply #9 on: January 27, 2013, 11:39:57 PM »
Hi,

 That will take quite some time, I first would like to distribute a proper bridge to Mecanim. Are you on Unity 4? cause really the construction guy is a thing from the past in terms of where Unity is going.

Bump me next week, ok?

bye,

 Jean

threedavid

  • Playmaker Newbie
  • *
  • Posts: 18
    • View Profile
Re: IOS Gameboy-like Character Controls
« Reply #10 on: January 28, 2013, 11:45:49 AM »
Hey Jean,
Sorry to say I'm using the last version in 3.x but that's only because my IOS license is for 3.x. I only thought of the Construction Guy because everyone else will also have it and the animations are already done.

I realize I'm asking a lot, but I also think this will be so helpful to everyone. It's such a big standard of gameplay.

If you wouldn't mind in the meantime if I ask you then so that I can make some progress on it this week, in the ControllersimpleMoveMobileTouch.unitypackage, on the "Character" (cylinder) you have the Get FSM Float action for the H input and another for the V input and a Set Vector 3 XYZ and then the Controller Simple Move and I added Smooth Look At Direction for good measure. My animated character, of course, is parented to the "Character". With this I controller works and I can move my character around, but it's frozen in one pose. And as I've said before, when I follow the Animation Graph 2 video the animated character is stuck in one motion and doesn't switch to others even though the Animation Graph on the animated character is correct.

So, my question is this, is there any other actions I should be looking at other then the Set FSM Float? What else, actions, events, variables, should I try?

David

threedavid

  • Playmaker Newbie
  • *
  • Posts: 18
    • View Profile
Re: IOS Gameboy-like Character Controls
« Reply #11 on: January 28, 2013, 12:37:16 PM »
Hey Jean,
BTW, the animated character has a "moveSpeed" variable. The "Character" (cylinder) has a "speed" variable that is set to the value of 200. I think what's going on is that Playmaker because the speed is set to 200 Playmaker makes my animated character walk even though it's not moving. And of course if I set the speed to 0 the animated character won't move.

Does that make sense?