playMaker

Author Topic: Animations not reacting correctly to the touch.  (Read 629 times)

Mikael1987

  • Playmaker Newbie
  • *
  • Posts: 5
    • View Profile
Animations not reacting correctly to the touch.
« on: February 04, 2014, 01:36:30 PM »

Given this FSM my little guy isnt playing the runningleft and runningright animations properly.
-In the wait for input state when i keep the touchscreen pressed it enters the charging state,after that i get X value of the touch.
-In the checkside I check that value against the Width of the screen,if i tapped to the left of the value EX:screen width is 480,480/2=240,with this i check if the tap is < or > than 240 to decide which side I should run,but it doesnt enter properly,its just  very random. Any idea and thanks in advanced!
PS:Also,is there an input to keep the touchscreen pressed? the charging state always ends at 1(it goes up from 0 in like 1 second).I'm using input touches asset.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 12405
  • Official Playmaker Support
    • View Profile
Re: Animations not reacting correctly to the touch.
« Reply #1 on: February 05, 2014, 02:27:29 AM »
Hi,

 Have you properly set up the scene to react to touch the way ou want? In short, do you get the global events called at least?

bye,

 Jean

Mikael1987

  • Playmaker Newbie
  • *
  • Posts: 5
    • View Profile
Re: Animations not reacting correctly to the touch.
« Reply #2 on: February 05, 2014, 12:48:56 PM »
I'm not quite sure what you mean,In the animator I've got a "Direction" Variable that with a threshold from -1 to 1 -1 being left,0 forward and 1 right. On my FSM i set that variable accordingly to a value of -1 in the "RunningLeft" event and 1 on the "RunningRight" event,then after the "CHARGING END" event ends and goes back to "StartRunning" I set the "Direction" to 0 so it playes the forward animation.
Maybe I'm missing something?.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 12405
  • Official Playmaker Support
    • View Profile
Re: Animations not reacting correctly to the touch.
« Reply #3 on: February 11, 2014, 10:29:57 AM »
Hi,

I think it's logical issue in your Fsm Flow.

 Can you pm me with this fsm and I'll try to see what's wrong there.

Also, starting from scratch sometimes helps. Build it step by step, it's sometime saves you a lot of time as opposed to trying to sort something big but messy.

bye,

 Jean