edited February 2014 in ORK Support
Has anyone been able to figure out to use Unity’s Mecanim system with ORK? I keep running into the issue where all I seem to be able to do is play the idle animation. I’m not sure what I should set the transition values/conditions too.
  • The setup of your animations in ORK depends on the setup of your Mecanim controller ...

    You can either just use the Play function to play a specific animation, or set the Parameters of the controller, which require your Mecanim controller to be set up the way that the set parameters will play the desired animation.

    E.g. if you have a bool parameter named attack in your Mecanim controller which plays an attack animation when it's true, you need to set this parameter in the ORK animation settings to true in your attack animation.
    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!
  • @cwozni Out of curiosity are you using UFPS?
  • GIL Thank you Im going to try to set up my "town people" when I get home and Ill post what I got. @RunawayDev I was looking at picking up UFPS from the asset store in the next few days after I get my NPCs up and running.
  • GIL so I have it working to a point. I can trigger the NPC to walk with bool when its true but on "random" patrol it just seems to move forward never turns or changes in any direction. I have two vars first one is bool walking and the other is float Direction. I'm not sure how to implement the float under the animations tab in ORK.
  • I guess the Direction parameter is the rotation your NPC would look at?

    In that case, that can't really be done currently. I'd suggest adding a small script to your game objects that update the parameter in mecanim based on the rotation of the object.
    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!
  • Sweet sounds good, I'll post the script on here to help anyone else out who may need it. I miss legacy animations lol.
  • You can still use legacy :)
    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!
  • I got it! I'll post a copy of the blend tree and how I set it up in ORK!!!!
  • @cwozni: That would be very helpful if you share!
  • The way I ended up getting Mechanim to play nice with ork was setting all the animations to bool. (using the raw motion cap asset from the asset store) Example with walking I set 3 bool vars. Walking, walkleft, walkright and I did not use the blendtree in mecanim. Back in ORK i set the three walking animations and set the play and stop parms. Walking (forward) play was set to bool true. Walking forward stop parm was walking bool false. Walking left/right needed just walking left/right bool to be true and the stop would set to bool false. Next i had to make sure all the of the animations in ORK are set to Walk (animation type).
  • Hi,
    apologize to join-in the topic.

    @GIL
    You can either just use the Play function to play a specific animation, or set the Parameters of the controller, which require your Mecanim controller to be set up the way that the set parameters will play the desired animation.

    E.g. if you have a bool parameter named attack in your Mecanim controller which plays an attack animation when it's true, you need to set this parameter in the ORK animation settings to true in your attack animation.
    I setup custom combatant, spawn it on scene, but its just 'floating' while moving, no animations , no motions, no jumping...what-so-ever.
    I've been trying for 3days+2nights... just to try getting it works...but to no avail..
    - is there a 'better' tutorial/guide for this part ? video ? image ?
    - where can I find that setting for 'true' in mecanim animation part ?

    *append the screenshot for my setting
    http://oi60.tinypic.com/bhynpf.jpg

    *the tutorial on http://orkframework.com/howto/2013/10/30/animations/ is very brief, doesn't helps .


    Thanks
  • Did you enable Use Auto Animation in your combatant's Animation Settings?
    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 March 2014
    Hi GIL,

    Still no avail in trying to get it right...
    Eg :- unable to 'Jump'
    *append the screenshot for my jump animation/setting
    http://i62.tinypic.com/29qi1jb.jpg

    I've also follow the Input Keys guide at http://orkframework.com/howto/2013/08/24/input-keys/ , but to no avail..

    For the Input Keys setting, I've also tried both :-
    - using Unity Input Manager
    - ORKInput Key
    ...and still failed to get the result right.

    Thanks
    Post edited by jooboo on
  • The Unity Input Manager type requires an input with the exact name you used to be defined in Unity's input manager.
    The ORK Input Key type is used to have multiple input keys mapped to a single key that can be used.
    I'd advice to use Key Code for quick results, you can simply select the key from the dropdown and it's ready to use.

    Regarding the animations, I guess you've got the wrong idea of how this works. It's not used in a way that you can press the Jump key to trigger the Jump animation.

    The animations you set up are assigned to Animation Types, which will be used by ORK Framework to play an animation (e.g. in the event system). It works like that:
    - you assign an attack animation to the animation type Attack
    - a battle event should play an attack animation on the user, so you add a Combatant Animation step and select the Attack animation type.
    - ORK now looks for the assigned animation of the combatant and plays the first that has been found. It'll search in the following order: Status Effects > Equipment > Combatant
    The system is built that way to e.g. allow weapons to have different attack animations (like spear and sword).
    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!
  • Hi GIL,

    alrite, I tried out using the Key Code, but to no avail unfortunately.
    - The character unable to Run, move , or what-so-ever ; it's just staying idle .

    My Input Keys setting screenshot.
    http://i62.tinypic.com/25re29y.jpg

    I'm just trying to get basic movements setup right , to try moving my character around, getting it to response to the movement/animation, before going further ... I can't believe it's taking me days just to try to do it right.

    Thanks
Sign In or Register to comment.