playMaker

Author Topic: Mecanim Animator Tutorials and Samples  (Read 21757 times)

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Mecanim Animator Tutorials and Samples
« on: July 17, 2014, 08:48:00 AM »
Hi Everyone,

 Here's a run down on the current tutorials and Samples you can study to learn how  PlayMaker can control Mecanim.

 Your first stop is the wiki page where you'll find the package to get the custom actions and tools necessary, as well as a series of samples showing various technics, as well as using a combination of pathfinding and mecanim.

I remembered that I also did the PlayMaker Learning project "stealth" player all in PlayMaker, and it's using Mecanim big time too :) so Indeed a very important sample to study:

Stealth Player Done in PlayMaker


We'll add reference to more content as we gather it.

 Bye,

 Jean
« Last Edit: July 18, 2014, 07:58:50 AM by jeanfabre »

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2511
  • Mender of the past
    • Cleverous
Re: Mecanim Animator Tutorials and Samples
« Reply #1 on: July 17, 2014, 09:58:18 AM »
Alrighty, we'll fill this thread with more info as time goes along but for starters it's important that you look at the Mecanim interface itself and understand how it works. It's possible that once you learn how Mecanim works that you'll see the application of the actions immediately and just be able to move forward like that!

Below is a link to Unity's official Mecanim tutorials, also I've started a YouTube Playlist for videos on this topic as well, which we'll populate over time.

Unitys Official Animation/Mecanim tutorials
YouTube Mecanim/Playmaker Playlist
« Last Edit: July 17, 2014, 10:00:40 AM by Lane »
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D

colpolstudios

  • Sr. Member
  • ****
  • Posts: 370
Re: Mecanim Animator Tutorials and Samples
« Reply #2 on: July 17, 2014, 04:27:57 PM »
Hi Lane I have been working on this topic: http://hutonggames.com/playmakerforum/index.php?topic=7470.0

Wip demo: https://dl.dropboxusercontent.com/u/150707256/playmaker%20stealth%20new%20character%20WIP/testing%20only.html

As you can see I was able to swap to the DonePlayerAnimator and use the Playmaker FSM's to control the new character I recently added the ability to equip the gun or not and you can only shoot with the gun equipped.

issues:

Character used has problems when using Mecanim, console warnings due to rotation and movement within the animation.

The character does not aim at the sight.

Not sure how to setup the animator controller :(

Despite looking at examples I am having trouble understanding how Mecanim works.

Personally I think the DonePlayerAnimator that was used needs to be re worked to use in the way I wish.


If You could offer any advice or help?

Regards

colpolstudios
 

Richardm1985

  • Playmaker Newbie
  • *
  • Posts: 15
Re: Mecanim Animator Tutorials and Samples
« Reply #3 on: January 19, 2015, 10:45:46 PM »
Guys,

I've been stuck on this step for 2 days now, how the hell do you use Mecanim with Animator State Synchronization ?

I've followed the wiki page, downloaded the demos (which only ONE uses the Animator State Synchronization script).

The demo scene with the Animator State Synchronization is so shit. Okay I understand to name the states exactly the same as the animator's states....now how do I refer to the parameters? "Set/Get Animator Float/Boolean? Awesome....now why the hell does my character not animate?

Can you please do a STEP by STEP tutorial on setting up SIMPLE animations? This asset was meant to save me time....

Richardm1985

  • Playmaker Newbie
  • *
  • Posts: 15
Re: Mecanim Animator Tutorials and Samples
« Reply #4 on: January 19, 2015, 11:07:41 PM »
The youtube series IS NOT aimed at a beginner. (https://www.youtube.com/playlist?list=PLFXYYxmSM-GecKCLR506o_87B3jmZ_oIz).

Video 1: Occulus Rift....did not watch it

Video 2: Playmaker Animator FSM state sync - PERFECT...unfortunately nothing is animating so how the hell do I get my character to change from idle animation to walk animation to run???

Video 3: Devblog...this guy gets so close to teaching how to animate your characters. He creates a state, talks about the "Set Animator Float" script...and then deletes his state!!! Then goes on to talk his game and the challenges.

Video 4: Eqvaliser - He isn't so bad but he just talks about his game and does not go through creating the states.

Please guys, just tell me/us how to start...where to start? I will happily pay for a beginner tutorial and not some crap outdated videos that teach a beginner nothing.

Richardm1985

  • Playmaker Newbie
  • *
  • Posts: 15
Re: Mecanim Animator Tutorials and Samples
« Reply #5 on: January 19, 2015, 11:29:36 PM »
How do I control when my animations animate by the click of a button??

Richardm1985

  • Playmaker Newbie
  • *
  • Posts: 15
Re: Mecanim Animator Tutorials and Samples
« Reply #6 on: January 20, 2015, 12:58:13 AM »
Looking at the stealth game, you have ethan being controlled without a "controller". Is that normal? I tried to have everything set up the same, but my character just stands there, but the playmaker script accepts that I am moving (glowing green).

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Mecanim Animator Tutorials and Samples
« Reply #7 on: January 20, 2015, 01:53:18 AM »
Hi

Ok, let's start a series of simple samples on this. I agree, diving into Mecanim is tricky, many concepts needs to be digested first, then PlayMaker on top, then the usual debug and miss... that's a lot, I give you that.

 So. You want to do an Ethan like character? Am I correct? it's important to define exactly how you want your character to behave.

I first will assume that you have TOTALLY gone through Unity's own learning material. It's critical you do this before tackling anything on your own.

http://unity3d.com/learn/tutorials/modules/beginner/animation

I mean this. Take the time to digest this, replay videos you did not get. EVEN the one on scripting. They explain KEY concepts here too.

http://unity3d.com/learn/tutorials/modules/beginner/animation/animator-scripting

once you have done this, come back to this thread with questions if you have, else I'll get into doing the ethan character with PlayMaker. But you have to understand that 99% of the work will be done outside PlayMaker, within the Animator system. So make sure you are able to recreate the controller for ethan to begin with. then taking control of it from PlayMaker will make a lot more sense. Directly trying to control an existing controller is difficult if you have no idea how it's built.

 Bye,

 Jean

Richardm1985

  • Playmaker Newbie
  • *
  • Posts: 15
Re: Mecanim Animator Tutorials and Samples
« Reply #8 on: January 21, 2015, 03:33:47 AM »
Hi Jean,

I want to apologize for how I started on the forum...by having a big whinge lol and I want to thank you for your advice. I decided, since you took the time out to write to me, I will give you the respect to take the time out to watch Unity's tutorials again.

I began to understand concepts that the first time I watched months ago, went right over my head and I also realised what I had to do.

- The first issue I was having was using the animator sync script. I still do not know how to make it work correctly.

- Second issue, my character would walk on the spot when playing the walk animation, even with "Apply Root Motion". Even when basing my playmaker scripts the way you had Ethan set up. I realised even though you did not have a "Character Controller" component on him...I needed one on my character. You have to tell me how you did that bro lol

- Third issue, I ran into difficulty changing the animations to play from walk to run. I did not know how to make the "speed" float increase depending on the length the "walk/run" button was pressed for. So I made a "Get Button Down" action (ctrl) to have my character run and it works!

You solved my problems bro and I like that you did not do my "homework" for me but helped me discover the answers. For that I am very grateful.

Could I please use your services once more though?

- Do you have any tutorials on the animator sync script I could look at other than the basic one that does not actually animate anything? Is this script designed to just "sync" with mecanim and not actually take any actions, events or variables?

- Could you example why/how Ethan (in your example) is able to move about without a "character controller" component or a "Controller Simple/Move" action?Is a character controller required? Do I need a "Get Axis Vector" for each action that calls an animation?

- How do I make the "speed" float variable slowly increase so I can transition from walk to run at a slower rate? Currently I have a parameter named "speed" in the animator controller. I have the following variables in playmaker "Speed" set to 10, "RunSpeed" set to 6 and "WalkSpeed" set to 3.

I have a Set Animator Float with a parameter of "speed" and the value to "Speed" (making it 10). I have this action set on both walk and run states. I have a Controller Simple Move with the Speed set to "WalkSpeed" and "RunSpeed" respectively.
« Last Edit: January 21, 2015, 03:37:25 AM by Richardm1985 »

Richardm1985

  • Playmaker Newbie
  • *
  • Posts: 15
Re: Mecanim Animator Tutorials and Samples
« Reply #9 on: January 21, 2015, 04:40:58 AM »
I have just solved my 3rd question lol. Float Interpolate (Math)! Set the From Float to "WalkSpeed" and the To Float to "RunSpeed" with a Time of whatever I want. Store the result into "input magnitude" (copied from Stealth example) and set the finish event to "RUN", which attaches to the Run State.

Thanks to 600 for that one (http://hutonggames.com/playmakerforum/index.php?topic=8142.msg39255#msg39255).

But just to be sure...do you think that is the best way to go about it?
« Last Edit: January 21, 2015, 04:55:34 AM by Richardm1985 »

Richardm1985

  • Playmaker Newbie
  • *
  • Posts: 15
Re: Mecanim Animator Tutorials and Samples
« Reply #10 on: January 21, 2015, 05:52:20 AM »
I seem to be having trouble with layers in mecanim. Jean you made a great example scene here: http://hutonggames.com/playmakerforum/index.php?topic=2267.msg10191#msg10191.

Any chance you are able to recreate it for mecanim bro?

Thanks for all your help

Demonith

  • Playmaker Newbie
  • *
  • Posts: 32
Re: Mecanim Animator Tutorials and Samples
« Reply #11 on: January 30, 2015, 04:04:43 PM »
Need more detailed tutorial of how to make character walking jumping and sort of stuff what things to use and how to control it in FPS and 3thrd person  :'(

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2511
  • Mender of the past
    • Cleverous
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D

Demonith

  • Playmaker Newbie
  • *
  • Posts: 32
Re: Mecanim Animator Tutorials and Samples
« Reply #13 on: January 31, 2015, 03:27:09 PM »
I watched all of them but there is no playmaker using tutorial with it i wont is to how to operation with playmaker to controle the character with mecanim human not legacy animation

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2511
  • Mender of the past
    • Cleverous
Re: Mecanim Animator Tutorials and Samples
« Reply #14 on: January 31, 2015, 04:42:30 PM »
Are you using the Animator Actions?

https://hutonggames.fogbugz.com/default.asp?W1031

After learning how Mecanim works you then the actions are pretty straightforward in use.

We'll make tutorials for this soon, but there is a lot of material for you to get something going. Remember also, Mecanim is not a system that is intended to be easier than legacy at the start. It's more complicated and harder to get working, with more features in the long run, so be prepared to learn it in and out before expecting a good result from it.
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D