playMaker

Author Topic: Problems with the animator controller and playmaker  (Read 4091 times)

ilovelessons

  • Junior Playmaker
  • **
  • Posts: 70
Problems with the animator controller and playmaker
« on: March 06, 2017, 10:49:55 PM »
Hi,

I am creating a simple 2D game and well let me describe my issue and what I have done so far (please note I have watched countless tutorials before i came to this fourm)

1. I am creating a simple 2D game using unity 5.50f3 2d sprites and am still in the prototye stage. I have created two animations for my character , Idle and Jump and well I have an animator controller looking like:

Entry --> Idle <----->  Walk

2. So went to playmaker window and added two FSM states with the events called IDLE and WALK.

3.  What I am confused is when I am in the IDLE state i want it to play my idle animation and when I am in my walk State I want to to play the WALK animation. So to each state I added "Play Animation" via the ACTION BROWSER and added the animation to the relative state.

4. When I press play it plays BOTH animations no matter what state I am in :s.

eveything I did is based on this video:

https://www.youtube.com/watchv=dmUEN3txNPY&index=3&list=PLC759306A1E692A10


I cannot figure out what I did wrong. What concept am I missing here?
Is something wrong with my Animation Controller configuration?

I am willing to explain more..

Thanks guys

zombie

  • Playmaker Newbie
  • *
  • Posts: 9
Re: Problems with the animator controller and playmaker
« Reply #1 on: March 07, 2017, 12:21:06 AM »
Your link gives me: This page isn't available. Sorry about that.
Try searching for something else.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Problems with the animator controller and playmaker
« Reply #2 on: March 07, 2017, 12:33:54 AM »
Hi,

 I think there is a great confusion here.

 The Animator system is only controllable via the Animator exposed parameters, you don't use PlayAnimation in combination with the Animator.

Make sure you first watch Unity introductions to the Animator component.

Can you make a screenshot of your animator editor window so we can see your parameters?

 Bye,

 Jean
 

ilovelessons

  • Junior Playmaker
  • **
  • Posts: 70
Re: Problems with the animator controller and playmaker
« Reply #3 on: March 07, 2017, 09:58:27 AM »
jeanfabre,

Thanks for the reply (well thanks to everyone).  I have attached the animator controller pic (I hope its this you asked for). I think I now understand that Animator and Play Animation are not connected.  As you can see in my pic there are two animations IDLE and JUMP.  All I want to do for the time is create a button so when I click it the character will JUMP ONLY and when U click back the button he will be in IDLE mode only. I am to assume IDLE and JUMP are two seperate states. But when I play the animation it does matter if the button is pressed or not the character will IDLE then JUMP then loop like that so it goes between the two states continuous in a loop.

How do I get playmaker to make it loop in the IDLE state and only then SWITCH to the JUMP State when I pressed the button.

What component do I need to attach to my object (in the action browser menu) to interact with the animator controller?

BTW this was the video link:


thanks again


jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Problems with the animator controller and playmaker
« Reply #4 on: March 09, 2017, 01:21:05 AM »
Hi,

 yes, you are getting confused between an "animation" component and an "Animator" component, I wish Unity kep using "Mecanim" instead "Animator" it would have saved so many confusions.

 so the video link do not use "Animator" it uses "Animation", so this video is of no use in your case.

You need first to learn about "Animator" and how to design it, and most importantly, what are Parameters:

https://docs.unity3d.com/Manual/AnimationParameters.html

then within PlayMaker, you'll have all the actions to control these parameters which is the way for you to control your "Animator" component at runtime. Actions such as SetAnimatorFloat for example, if you search in the Action browser for "Animator" you'll see all the actions you have to work with it.

 Let me know how it goes.

 Bye,

 Jean