playMaker

Author Topic: Animator Any State action [SOLVED]  (Read 3519 times)

Hugo111

  • Playmaker Newbie
  • *
  • Posts: 45
    • UFENCEVR
Animator Any State action [SOLVED]
« 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
« Last Edit: February 15, 2018, 02:48:55 AM by jeanfabre »

Hugo111

  • Playmaker Newbie
  • *
  • Posts: 45
    • UFENCEVR
Re: Animator Any State action
« Reply #1 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 ?

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7615
    • jinxtergames
Re: Animator Any State action
« Reply #2 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 :)

Hugo111

  • Playmaker Newbie
  • *
  • Posts: 45
    • UFENCEVR
Re: Animator Any State action
« Reply #3 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 ?   

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Animator Any State action
« Reply #4 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

Hugo111

  • Playmaker Newbie
  • *
  • Posts: 45
    • UFENCEVR
Re: Animator Any State action
« Reply #5 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!

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Animator Any State action
« Reply #6 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

Hugo111

  • Playmaker Newbie
  • *
  • Posts: 45
    • UFENCEVR
Re: Animator Any State action
« Reply #7 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