Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: wyliam on April 17, 2011, 03:04:21 PM

Title: Basic Character Animation FSM setup
Post by: wyliam on April 17, 2011, 03:04:21 PM
I'm admittedly new to FSMs, I've been attempting to replace the current "ThirdPersonAnimation.cs" script with Playmaker. I've a MoveFSM that moves the character and contains some anim switching actions. These anim switching actions change the animation state in AnimFSM. (See attached screenshots).

Currently the game crawls to a halt as the switch flips between "Basic Move" and "Update Idle" (or Walk/Run). Update Idle is a state that checks to see if the AnimFSM is in the Idle state already, and switches it if it isn't. Is this not the preferred method (constant state switch)? I don't want to wait for the animation to complete, as interruption will be expected.

Thoughts?
Title: Re: Basic Character Animation FSM setup
Post by: Alex Chouls on April 17, 2011, 05:30:20 PM
I posted a tutorial video showing the setup I normally use... On the road right now, but I'll look at your FSMs this evening...
Title: Re: Basic Character Animation FSM setup
Post by: marvmiller on April 18, 2011, 02:11:39 PM
Is 'Get Controller Speed' a custom action?  I don't seem to have it..
Title: Re: Basic Character Animation FSM setup
Post by: Alex Chouls on April 18, 2011, 02:40:07 PM
You can use Store Magnitude in Get Axis Vector. But I will add the ability to get the Velocity and Speed in Controller Simple Move, so you can use the speed after collisions...
Title: Re: Basic Character Animation FSM setup
Post by: wyliam on April 18, 2011, 06:03:41 PM
Yeah- "GetControllerSpeed" is a custom action that returned the controller.velocity.magnitude instead of the velocity. I hacked it from "GetControllerVelocity".
BTW, I LOVE that I can create custom actions.

One thing that would be useful for first time users are better explanations of certain actions. For example, the "SequenceEvent" usage is a bit confusing. An example of it's use (written out would be fine) in the Action reference section (like Unity does with their script references) would be helpful. Just a suggestion.

@alexchouls: where is the tutorial video with your setup you referred to? Is that in the Simple Character Control thread?
Title: Re: Basic Character Animation FSM setup
Post by: marvmiller on April 18, 2011, 06:10:25 PM
Cool, custom actions is definitely great! 

I think this was the video Alex was referring to:
Title: Re: Basic Character Animation FSM setup
Post by: wyliam on April 18, 2011, 07:29:25 PM
Hot damn. I must've missed that video.

Thanks!