edited February 2015 in ORK Support
I apologize in advance if there is something obvious that I'm missing due to my own lack of experience. I read through all of the forum topics on Mecanim and didn’t see the question I have.

I’ve followed the Mecanim tutorial and so far everything is working just fine. The only issue is since the run state isn’t connected to anything, my character will just pop back into their idle state once they stop moving. It’s something minor, but it looks awkward to me because it’s so sudden. So my question is, is there any way to transition from the run state to the idle state, so that the character will come to a more natural looking stop?

If I connect the run state to the idle state and leave Use Play ticked, the character will play the run animation and then play the idle animation, even if I’m still moving. I imagine that if this can be done, it can be done via parameters, but the truth is I don’t really know how they work within ORK. What parameters I've tried have simply resulted in ORK playing the walk animation instead and the run animation not being triggered at all.

Any help or insight would be greatly appreciated, thanks!
  • Without seeing your setup, usually this is done with using parameters.

    E.g. having a bool parameter that is set to true while the combatant is running (i.e. when the run animation is played, set it to true - when it's stopped, set it to false). Add a check to the transition back to the idle animation for that bool to be false.
    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!
  • Right now, it's set up exactly the way that it is in the Mecanim tutorial. No custom controller, everything is still being handled by ORK. I'll give it a try using bool parameters, thanks for the tip! :)
  • I had a similar issue, and still fixing a few things here and there to get it right. @LNMRae keep in mind the Mecanim tutorials on the forum are pretty high level, and lack indepth details. I would encourage you to look into more Mecanim tutorials on you tube and digital tutors particularly http://www.digitaltutors.com/tutorial/1144-Introduction-to-Mecanim-in-Unity if you have an digital tutors account. ORK simply refers to the states that are set up, so its really about how you set those up to get them to work effectively.
  • Thanks for the input, David. I went back and read a bit more about Mecanim to make sure I have a grasp on it and want I want to do. I feel like at this point my issue is more trying to get Mecanim to play nice with ORK in particular.

    I’ve been messing with the bool parameters and my issue now is that I can’t figure out how to set the parameter up properly in ORK.

    Here is my setup at the moment:

    Idle is the default animation. The condition to transition to Run is a bool called running. It is set to false. It is set to ‘Use Play’ within ORK under the Base/Control, Animations tab.

    Run is also set to ‘Use Play’ within ORK. It’s condition to transition to idle is running set to true.

    I’ve tried several different combinations of Set Parameter under the Animations tab in ORK, and still can't get it to work right.

    The closest I’ve gotten is my character will stand idle no problem and will begin to run when I put in the proper key input. However, they eventually complete their run animation and will then immediately transition to the idle, even if I’m still holding down the inputs to move. What I’ve been unable to figure out is, I need the bool to switch only after I release the key to move. Instead, as of right now, it’s toggling at the wrong point.

    I'm sure this is a matter of me not knowing what check boxes to tick in ORK.
  • How did you set up the transition from Run going back to Idle? It sounds like from your description that it's set to exit on animation end, which is not what you want in this case. Change that transition to bool as well and set it to running = false. Also, make sure your run animation is looping in its settings.
    My little chunk of the internet: http://artemic.com
  • Hello, Firrereo thanks for trying to help. I tried to switch to using a bool instead in all experiments done yesterday trying to get it to work, but I'm still having the issue of my run animation ending and transitioning to idle even while I'm still holding down the move buttons.

    If I try to switch the bool from the way it's currently set up, the run animation will trigger immediately.

    The run animation is set to looping.

    Right now, I still assume that it's a matter of the bool toggling upon the run button being pressed, rather than when it's no longer being held. That's just my assumption though, since I have no idea how it's coded. I need to know how to properly set up the parameters within ORK's animation system to play the transition on button up rather than on button down.
  • How'd you set up your input keys in Unity and Ork? If you're using the Unity Input Manager or a Key code as your origin, you can change the input handling there to down or hold or whatever you need it to be.

    In my project, my WASD movement keys are set to Hold (using key codes), and the booleans trigger just fine on my mecanim disaster of a controller. Can you post some screenshots of your setups?
    My little chunk of the internet: http://artemic.com
  • You can also use the Auto Move Speed Parameters when setting up mecanim animations in ORK. Using that you can base your transitions on the move speed of the combatant.
    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!
  • Input keys are already set to hold. Everything is the default, except for I changed the arrow input set up to WASD. Controller is set up exactly as the tutorial. I don't really have anything to take a screen shot of, as every combination of parameters I've tried hasn't worked correctly, so I've removed them as I went. ^^; Firrerreo, how are your parameters set up in ORK? Do you have them set to Stop or Play? Do you have your bool set to toggle or bool value? What animations are the parameters set on? I'm completely lost on where to set the parameters.

    GIL, can you elaborate on the Auto Move Speed Parameters setting? I tried setting up a float, but I'm having the same issue where the transition happens while I'm still holding run, rather than after I've let go of run.

    Thanks to everyone who's tried to help me with this, I'm convinced that it's something minor that will seem obvious once I've got it working.
  • Sure, here's everything.

    First up, my controller for movement:
    image
    Walking and running are bool parameters - true to start, false to end.

    image
    Here's one of the input settings for the A&D keys. Same idea applies for W&S.
    I also have controller setups, which are then all combined into two Input Settings labeled "Horizontal" and "Vertical"

    Then under Game Controls,
    image

    image
    Animations settings for Walk

    image'
    And for Run

    And then finally on the player combatant:
    image
    My little chunk of the internet: http://artemic.com
  • The auto move speed parameters will simply set the parameters to the vertically and horizontally move speed of the combatant. If either method results in the same, there's probably something wrong with your animator's setup.
    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!
  • edited February 2015
    Hey, Firrerreo, haven't been able to work on this in a while but wanted to pop in and give you a huge thank you for taking the time to post the screen captures. Though everything looks the same when I compare it to my own set up, I still can't get the animation to transition to a nice end when I lift up on the move key. I know I'm making a newbie mistake somewhere, I just haven't been able to figure out where. One of these days, I'll create a new project just to mess around with and I'll use your pictures as reference. Again, thank you!
    Post edited by LNMRae on
Sign In or Register to comment.