edited July 2014 in ORK Support
Hi guys! I need help making Mecanim talk... errr *cough cough*, I mean make Mecanim animation work if you would please. =)

Okay, here's what i've done and when I test it, the idle animation works. However, when I move around, the animation doesn't change to walk. Its stuck on idle animation. Any idea how I can get it to work?

  • New Update:

    Okay, instead of using two layers to define each state, I just put idle and walk in base layer and defined in ORK animation and put both state on layer 0 and unchecked set horizontal speed box and unchecked use play box. Then I put a transition from idle to walk state and back using walk parameters. I tested it out and the animations seems to work fine transitioning from idle to walk when adjusting the walk parameter in the animator while in game mode.
    Now, I just need to assign the walk parameter the keyboard so when I move, it will use the walk parameter which then calls the animators. How can I get the keyboards to assign to walk parameter so walk parameter can be called when i'm moving?
  • edited July 2014
    Another update:
    Since I couldn't find a way to call the animator parameters to the GetAxis of "Horizontal" and "Vertical", I tried making this work in a script. Here's what I got on JS script and attached to the player object.

    #pragma strict
    internal var animator : Animator;
    var walk : float;
    var walking = false;
    function Start () {
    animator = GetComponent(Animator);
    function Update () {
    walk = Input.GetAxis("Horizontal") || Input.GetAxis("Vertical");
    function FixedUpdate () {
    animator.SetFloat ("walk", walk);
    animator.SetBool ("walking", walking);
    if (walk == 0)
    walking = false;
    walking = true;

    The animation transition works given that the animator parameter walk is set to float and walking is set to bool then set transition to walk state with greater than 0.1 and transition back to idle state using walking parameter is set to true. However, I don't think this is the proper way in animating mecanim animations with ORK because player moves sluggishly as if its colliding into something... there's gotta be a way to make Mecanim animations work with ORK without a script involve... Gaaah, this is driving me insane =(
    Post edited by Ramen on
  • Yeah, mecanim is always a tough fight :)

    Generally, you can play mecanim animations with ORK in two ways:
    - using the Use Play setting will simply call mecanim's play function for the animation
    - setting parameters that should trigger the animation to play

    If you're now using parameter based transitions, you should also set up those parameters in ORK's animations. When ORK wants to play an animation, it will (based on your settings) either use the play function of mecanim or set the parameters in the animator. What mecanim does with that input is pretty much out of ORK's control :)
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • Thank you very much GiL! That helped a lot and actually clarified and fixed my issue =)
  • @Ramen & @gamingislove Thanks! I was going to start a similar thread but you both helped me understand and resolve my issues ;)

  • edited July 2014
    Glad to be of help somewhat Steve. I got the Mecanim animations working just as how I want them to. If you got any questions, i'd be glad to help you out on it somehow =)

    As of right now, I am trying to make a player be able to sheathe and unsheathe weapon during non combat and when entering combat in active time battle system, the player will be able to toggle a button to unsheathe or sheathe weapon. So, if player sheathes weapon then player will be attacking with hands doing just a single basic Mecanim animation... well, that's what i'm trying to accomplish right now. If you got any ideas in how to get it done, i'm all ears =)
    Post edited by Ramen on
Sign In or Register to comment.