playMaker

Author Topic: Character Moves to finger tap point for iOS ? [SOLVED]  (Read 13264 times)

mickman

  • Junior Playmaker
  • **
  • Posts: 62
Character Moves to finger tap point for iOS ? [SOLVED]
« on: November 04, 2012, 04:44:33 PM »
Hi,

I'm trying to get a 3rd person character controller to follow wherever I tap on screen.

So before I venture onwards, I'm wondering if this has already been accomplished. (finding it hard to find anything on the forum)  

Character Actions:
walk- one finger tap
run -  two finger tap

controller should turn and point towards the tapped point.  

 So maybe this has already been created by other PlayMaker users... if so I'd appreciate a link.


  

 
« Last Edit: November 22, 2012, 01:49:34 PM by mickman »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Character Moves to finger tap point ?
« Reply #1 on: November 05, 2012, 12:35:24 AM »
hi,

 Your first stop is the penelope sample from Unity, I can recall they have something like that as one variant for controlling the character.

http://unity3d.com/support/resources/tutorials/penelope


bye,

 Jean

mickman

  • Junior Playmaker
  • **
  • Posts: 62
Re: Character Moves to finger tap point ?
« Reply #2 on: November 05, 2012, 05:02:02 AM »
How about I utilise these actions.

Get Touch
Screen to World
iTween Look to


 mmm...  itween.  ;)  

 I looked over a few PlayMaker Vids. they help a lot. itween allows for ease in-out, making more professional motions.
« Last Edit: November 05, 2012, 05:03:36 AM by mickman »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Character Moves to finger tap point ?
« Reply #3 on: November 05, 2012, 06:34:12 AM »
Hi,

 yep, that can do too, if you haven't yet any controllers for your character, iTween would be quite a good start.

Also, check hotween. I have created a set of actions for this. It may very well perform better if you are planning on mobile development.
http://hutonggames.com/playmakerforum/index.php?topic=2299.0


bye,

 Jean

mickman

  • Junior Playmaker
  • **
  • Posts: 62
Re: Character Moves to finger tap point ?
« Reply #4 on: November 06, 2012, 07:19:08 PM »
Hi Jean,

Here is a quick video I created showing my problem.  Basically the character moves to wherever I tap on the ground plane but the character's run animation is not playing.  ( note: the video does zoom in close to help with better viewing )

« Last Edit: November 07, 2012, 04:07:08 AM by mickman »

mickman

  • Junior Playmaker
  • **
  • Posts: 62
Re: Character Moves to finger tap point ?
« Reply #5 on: November 07, 2012, 03:18:56 AM »
I'm going to load up Hotween later in the week to give it a run through. So to achieve similar results, using a tap gesture to move the character, would I simply add a Hotween onto the character and then adjust settings using the Hotween visual editor ?



« Last Edit: November 07, 2012, 04:01:03 AM by mickman »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Character Moves to finger tap point ?
« Reply #6 on: November 07, 2012, 04:12:57 AM »
Hi,

there is two different aspect here, if the animation is not triggering, then it's likely because you don't have the right controller, and since you are indeed moving the player programatically as opposed to listening to user's input, it's likely that the animation will not trigger indeed without modifying your controller.

[EDIT]
ok I get it, I think you are in conflict with the player animation controller that could be there.

What you need to do try and trigger the run animation without even walking anywhere, just by pressing a button or something. And take it from there, automatic player movement and animation triggering problems are not related really.

Hotween is not visual. you will have to use playmaker actions to define the hotween action.

 you might actually want to avoid all this all together by simply having a simpler set up where your player is following a target using maybe "smooth follow" or "move towards"

bye,

 Jean

bye,

 Jean
« Last Edit: November 07, 2012, 04:17:32 AM by jeanfabre »

mickman

  • Junior Playmaker
  • **
  • Posts: 62
Re: Character Moves to finger tap point ?
« Reply #7 on: November 07, 2012, 05:47:40 AM »
Hi,

Thanks for the reply Jean,

When you say   " if the animation is not triggering, then it's likely because you don't have the right controller, and since you are indeed moving the player programatically as opposed to listening to user's input, "

but the player is being moved by user input  ( a tap gesture ) yes ?


I simply need to know, how to apply the "play animation" action when the character controller moves in world space.

Would be great to have an action that fires a play animation when a controller moves

 eg.  single tap =           play walk ( = speed 1 )
                                   > speed1 - play run
                                    else -  play idle
                                    else if double tap -  play jump

 I tried to have the animation play on the joypad setup but was similar issues so I decided to try another approach ( hence the tap screen ) 
  I guess I now have an understanding of setting up both controller settings.. that's a bonus ;)     I could even incorporate both styles into one game providing the player with several controller choices. 



« Last Edit: November 07, 2012, 05:59:31 AM by mickman »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Character Moves to finger tap point ?
« Reply #8 on: November 07, 2012, 05:54:53 AM »
Hi,

 do you have a controller of some sort on your player? I think it's related

playing an animation using playmaker action works, so if it doesn't trigger, it's likely because there is a clash somewhere. For example a player controller that keep playing the idle animation for example.

bye,

 Jean

mickman

  • Junior Playmaker
  • **
  • Posts: 62
Re: Character Moves to finger tap point ?
« Reply #9 on: November 07, 2012, 06:01:14 AM »
Hi Jean,  

yes the idle animation does keep playing ...    it's the standard third person controller setup (the Construction worker )

Simply moving a capsule about is relatively straight forward... but getting an animation to fire as the capsule moves is driving me nuts   ???

 Jean, is there any chance you could add a  play animation to one of the iOS example files.  That would be really helpful.  This way I can better comprehend transitioning from one state to the next where a play animation action is called.



  
« Last Edit: November 08, 2012, 04:41:00 AM by mickman »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Character Moves to finger tap point ?
« Reply #10 on: November 08, 2012, 05:15:20 AM »
Hi,

 Simply delete that controller indeed, since you don't need it and the animations you fire will not be shunted.

which IOS example files you mean? if you point me to the right scene, I'll happily have a look.

 I have made some samples available with quite advanced animation control done in playmaker, you might wanbt to take a look as well:
http://hutonggames.com/playmakerforum/index.php?topic=2267.0

bye,

 Jean

mickman

  • Junior Playmaker
  • **
  • Posts: 62
Re: Character Moves to finger tap point ?
« Reply #11 on: November 08, 2012, 10:30:17 AM »
Hi,

 The example package =  ControllerSimpleMoveMobileJoystick.unitypackage

The primitive cylinder could be changed out for the Construction worker &
 add a play animation action to the controller.  (  An  Idle - walk - run animation would be neat since these already come installed with the construction worker's 3rd person controller )  

 note:This is iOS based so no keyboard controls.

That would help me so incredibly much to comprehend where I'm going wrong here.

 Mick
« Last Edit: November 08, 2012, 03:30:29 PM by mickman »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Character Moves to finger tap point ?
« Reply #12 on: November 09, 2012, 01:36:05 AM »
Hi,

 ok, allow me few days to come up with this, if you don't hear me by mid next week, please bump this thread, thanks.


bye,

 Jean

mickman

  • Junior Playmaker
  • **
  • Posts: 62
Re: Character Moves to finger tap point ?
« Reply #13 on: November 14, 2012, 03:34:36 AM »
Bump....    :)

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Character Moves to finger tap point ?
« Reply #14 on: November 14, 2012, 04:53:26 AM »
Hi,

 yep, I am on the case, I am currently mapping the anims, so it will take some more time.

bye,

 Jean