playMaker

Author Topic: FSM for character reactions (not player)  (Read 1890 times)

santelia

  • Junior Playmaker
  • **
  • Posts: 78
FSM for character reactions (not player)
« on: June 22, 2012, 01:02:59 PM »
I have to program a character to react to the presence of the payer within a certain area.
Surely I use some triggers to detect where the player is, and some global variables to know certain conditions (where the player comes from, what has he got since then, etc etc).
The question is: to make my character react, like move, run, escape, come near, and so on, do I have to use the "animation" set of actions (play, blend, stop, etc) or do I have better to add a character controller component and use a movement set of actions (maybe iTween, or maybe other ones)? In other words (given that I added a character controller), if I tell the character to "move to", will he start the walking animation or not?
What would you suggest as the proper way of doing all that's typically needed?

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: FSM for character reactions (not player)
« Reply #1 on: June 23, 2012, 04:34:27 PM »
Hi,

In most cases, you will need to move the character, and also control the animation for the movement to be realistic. I am not aware of a built in character controller doing all this automatically. You can however build that simple wrapper around that, and detect when the transform is moving, have the player turn automatically to look to the direction it's moving, and while moving, have the "walk" animation running.

Does that make sense?

Bye,

 Jean