edited April 2018 in ORK Support
Hello everyone, I've just recently started using ORK and can't figure out how to simply animate a weapon using a mouse click.
I'm just starting off using a legacy animation so I can get the feel of things.

I've added an "animation" component to my "left_hand" game object, and put the animation into the public slot (and set the animation as legacy under the debug tab).

I've added an input type "attack" and set it to mouse click button 0, added it as a control map and added that to the combatant.

The animation component is as stated attached to an empty game object that has an "equipment viewer" for my sword attached to it.
So I can pickup the sword, equip it so it shows on my viewer, but when I try clicking the mouse button I get nothing. I imagine I'm missing something simple but just can't figure it out. Any help would be appreciated greatly!

I suspect I've either 1. put the animation component in the wrong spot (maybe it needs to be somewhere else on my player prefab?), or 2. I feel like I'm missing an association somewhere... I scoured all the ORK Framework sections and even tried to switch the attack input to the space bar instead of a mouse click to make sure it wasn't because I had set the player control input to "button" and not "mouse".
Post edited by flymolo on
  • I assume your combatant's prefab already has an animation component somewhere, which is used to play the other animations (e.g. idle, run, etc.)?
    That's the animation component used by ORK, the animation on your hand is ignored here.

    Luckily, you can just skip ORK's animation system for that use case and directly play the legacy animation on your hand's animation component using a Legacy Animation node in the event instead. You have to define the path to the child animation component in the Child Object field (e.g. spine/left_arm/left_hand).
    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!
  • Oh thank you very much, that works great. I really appreciate the info!
Sign In or Register to comment.