Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: Hugo111 on January 29, 2018, 03:02:56 PM

Title: Animator Any State action [SOLVED]
Post by: Hugo111 on January 29, 2018, 03:02:56 PM
Hi All. I have a problem  in the animator where I have an idle state and a selection  of other animations that when triggered  move to the appropriate animation states  then moves back to idle , my  problem is that if another trigger ( Bool)  is hit at the  same time as an animation is being played,  it won’t immediately  go to that animation but is played after, so not immediately played, is there any way this is easily set  up within mechanim ? I’ve tried to do that with “Any State ” but cant seem to get it to work is there a playmaker action that can get me in and out of this state ? This shows the problem but uses code to resolve it!  Thank
Title: Re: Animator Any State action
Post by: Hugo111 on February 06, 2018, 12:11:56 PM
Reply to self : Well ive managed to half sort it out with a triggered float parameter in a direct blend tree, with the idle animations set to 1.0 and others to 0.0
the problem is that the transitions are quit abrupt ( so either 1or 0) with no blend between,is there any way to do that ? Smoothing those transitions ?
Title: Re: Animator Any State action
Post by: djaydino on February 07, 2018, 02:46:18 AM
Hi.
I think it is best to ask on the unity forums or look on youtube for unity blend tree as it has not much to do with playmaker :)
Title: Re: Animator Any State action
Post by: Hugo111 on February 07, 2018, 03:10:30 PM
Thanks for your reply, id looked through all of the forums, YouTube blend trees etc and the answer seemed to be a coded smoothing between those conditions, hence the question on an playmaker smooth action to move between these states ?   
Title: Re: Animator Any State action
Post by: jeanfabre on February 08, 2018, 04:13:20 AM
Hi,

 Maybe the actions provided already allow for this, but I need to see what kind of smoothing technic they use and how it controls Animator. Can you point to the information you found so far?

 Bye,

 Jean
Title: Re: Animator Any State action
Post by: Hugo111 on February 08, 2018, 10:15:59 AM
Hi Thanks jeanfabre . This is the script to turn off other animations, but immediately pay the desired one . I refer to the YouTube clip to see the problem in hand . Thanks!
Title: Re: Animator Any State action
Post by: jeanfabre on February 14, 2018, 03:33:36 AM
Hi,

 yes, so what this script does is control every state and switch bool animator values to false and then set the animator value to true on the animation you want.

basically, in PlayMaker, this can be done via a broadcast event passing as a string the name of the animation you want to play.

 Each fsm controlling a specific animator, can check this event, and if the name doesn't correspond you stop, else you play.

 Bye,

 Jean
Title: Re: Animator Any State action
Post by: Hugo111 on February 14, 2018, 10:10:22 AM
Hi jeanfabre thanks for your ideas, I managed to work out a way of getting around of my problem with any state, ive used floats to triggered actions, "set animator float" at the same time with all other floats actions set to zero.. looping back to idle, that seem to work fine allowing animations to flow through each other, much better than a blend tree which was the other way of doing it.  Thanks