playMaker

Author Topic: Easy animation question[SOLVED]  (Read 2693 times)

tiggus

  • Playmaker Newbie
  • *
  • Posts: 6
Easy animation question[SOLVED]
« on: June 09, 2013, 03:05:03 AM »
Sure this is covered somewhere but I am trying to figure out the optimal way to transition between animation events for a npc and running into some stumbling blocks.

I have the following very basic loop:

isControllerGrounded - false then go to state that plays falling animation.  true go to a state that plays walking animation and moves the object with simpleMove.

My question is what is best way to have this executed every frame so that it is continually checking if object is grounded or not?  The only way I found to get this to work is to add a "NextFrameEvent" after each animation and send finished event which loops back to my isControllerGrounded state.  This seems to bomb out under certain conditions and looks like it is very cpu intensive.

« Last Edit: June 10, 2013, 01:09:30 AM by jeanfabre »

tiggus

  • Playmaker Newbie
  • *
  • Posts: 6
Re: Easy animation question
« Reply #1 on: June 09, 2013, 04:27:53 PM »
Adding screenshot that hopefully explains my question.  Simplified it to simply the falling animation - I want it to play animation while falling and stop playing animation when it is on ground.  However the state stays stuck on the falling state even when on ground unless I add a "NextFrameEvent" action as well.


tiggus

  • Playmaker Newbie
  • *
  • Posts: 6
Re: Easy animation question
« Reply #2 on: June 09, 2013, 05:01:03 PM »
Turns out my issue was using multiple FSM's with "isControllerGrounded" as it uses the last state of the move command it was getting confused in certain cases since the states were executing concurrently.  At least that is my best guess.  I put my walking and falling into the same FSM and it seems to work OK now and without need for the nextframeevent action.

downup

  • Playmaker Newbie
  • *
  • Posts: 5
Re: Easy animation question
« Reply #3 on: June 15, 2020, 04:18:00 PM »
Turns out my issue was using multiple FSM's with "isControllerGrounded" as it uses the last state of the move command it was getting confused in certain cases since the states were executing concurrently.  At least that is my best guess.  I put my walking and falling into the same FSM and it seems to work OK now and without need for the nextframeevent action.

Sorry for bumping this thread, but could you be so kind to share you setup to see if the charactercontroller is grounded or not :)

Want my character to use my "Falling idle" animation if not grounded and then go back to normal when it hits the ground.