edited September 2014 in ORK Support
Hi there!

So im new in ORK, i'm trying to understand the basics of animation in ORK with Mecanim.

My problem is so easy and simple, but i can't solve it.

First, i'm not able to understand how ORK and Mecanim controller comunicates, i mean, i put a mecanim controller to my prefab with one animation to test, and on Mecanim animation 0 i put the same name on state name and on animator. And when i hit play the character plays that animation just at start, and then don't play this animation anymore. I don't know how to assign this animation to a key.

Second, i don't know how to assign a key (for example "k") to a custom animation. Imagine i want to let people play animation "Dance" when they press K button, i really don't know how to do that. I Don't know how to assign that key on "Game Controls".



summarizing: how to assign my animation.fbx to an Animation Type.



If there is an Ork Mecanim detailed tutorial, just show me it please. If not try to explain it.

Thank you and excuse me for this horrible english, if u can't understand it i will use google translate next time xD

Thank you !



EDIT:
Ok, i followed this tut: http://orkframework.com/gameplay/2014/07/31/mecanim-animations/

And i made all step, except, in the animator controller, i only made an idle state and a transition to Dance Step, i made a Bool Parameter called Dance, and linked it to Mecanim Animation 1 and value type Bool.

I understand all of this. And when i hit play the idle animation works fine, but the Dance animation no, cuz, i didn't assigned any key to play this animation, and i don't know how to do it using ORK.

How i can assign it ? I know, its a noob question, but i'm learing, can't do more.

Thank you.
Post edited by clarkk on
  • edited September 2014
    Well, ORK isn't really made for simply assigning a key to play an animation, so to get that going is a bit more complex :)

    Here's a short description on how to achieve that (let me know if you need more details somewhere):
    - create a Game Event that plays the animation (either using Play Combatant Animation step to play a combatant's animation assigned to an animation type, or using Mecanim Animation step to directly set up what animation should be played).
    - create an Input Key in Base/Control > Input Keys with the key you want to use.
    - create a Global Event in World > Global Events, select the event asset of your game event and set Event Type to Key. Now you can select the input key you created and set up some requirements (e.g. set In Control to Yes to only play the event when the player is in control).

    Optionally, you can also use an Event Interaction component with start type Key Press instead of the global event. In that case, you have to add the event in your scene (or e.g. your player's prefab).
    Post edited by gamingislove on
    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,

    Thank you very much for your answer.

    For now, I have not managed it to work. It seems I am more bad than I expected.

    Input Keys and Global Events are well done.

    The problem I'm having is that I'm not communicating with mecanim.

    Here is the screenshot of the event (i think is the problem):

    image

    State Name in mecanim controller is Dance, like in the Game Event, thats ok.

    The Layer index i think its 0 cuz is the Basic Layer (default layer when creating a controller), anyway i tryed with -1 and 1, but nothing.

    The only problem i can see is the Actor. I can't open the drop list to choose the actor, i just click there but nothing opens. I tried with the Object Prefab, but the same, i'm not able to open de Actor Drop and choose something.

    I don't know if this is the problem, but i tried many combination using mecanim, and i'm not able to get this working xD

    Thank You.
  • Hi =)

    Well, I believe the problem to your issue is that there is no actor like you mentioned. You have to go to the "Event Settings" node then scroll down to "Event Actors" then add an actor. Change the type to player then leave the rest of the settings alone. Then go back to the animation then choose player as the the actor=)
Sign In or Register to comment.