At the moment I am playing around with the animation system (to finally understand it ;-)).
I used Animancer and Mecanim Animations and I would like to use one of this systems.

The only problem is: I can only get the default anim to work (triggers by the animator controller I guess). All other animations (just used a few trigger ones like walk, idle and run) won't be fired. The character will move (with idle animations playing)

I used this https://orkframework.com/ork-2/tutorial/gameplay/mecanim-animations description.

Any idea or hint what I am doing wrong?

- I moved the animations auf out the fbx to be sure its not the problem
- I created a simple animator controller (idle, run, walk)
- No parameters or transitions are set up for now
- Idle is the default state/animation (works)
- the correct player prefab is spawned (with controller, animator on parent object)
- Animation & Movement is set to "Default Mecanim" and the animations are setup (idle, run, walk) and set like in the description
- autoanimation is turned on
- move speed is disabled
- horizontal/vertical move is set
  • So only the default (idle) animation is playing and nothing else? If that's the case, your assumption is correct; that part is simply triggered by having the animator component on the player prefab.

    You could try following a certain section of Keldryn's tutorial. Just scroll down to 4. ORK Setup and follow only that part. For State Name, since you aren't using sub-state machines, just use the exact name you used for your Idle/Walk/Run states in the Animator.
    Keldryn said: The Combatants should have "Use Auto Animation" enabled under Automatic Move Animation (at the very end of Part 1, above). When using auto move animations, ORK will play the Idle/Walk/Run animations depending on the combatant's movement speed. In the animation setup above, we're using Animator.CrossFade() to play them by specifying the state name on the animator.
  • edited November 2022
    @Scyra Thanks for your help and reference of this great tutorial. I think I found my root problem, but I do not know how best way would look like. Another problem was the naming of the animations (Unarmed.Walk if using substatemachines).

    The problem or difference seems to be, that I use the prebuild animator controller from Explosive (its quite comprehensive). So I have different parameters which have to be sent into the controller.

    So I guess:
    option 1: edit the ORK3 setup "Animations - Mecanim - Animation" to pass the parameters into the animator controller. And maybe disabling auto parameters (not sure what they are for)
    option 2: build my own controller as described in the tutorial.

    I'll try option 1 for now. Hopefully the parameter setup is as straight forward as it looks.

    Bildschirm-foto-2022-11-12-um-10-09-12
    Post edited by thomas123 on
  • Oh, that's a fully built root motion character controller. It should come with a script that you add as a component to your player character and all your movement is handled through that. I see Gil already wrote some good instructions in the thread "Question about Explosive RPG Character."
  • For Mecanim animations, I'd recommend not using auto animations. If your animation setup already comes with something that handles movement animations for you, I'd just keep it at that and set up the animations you need to play via ORK (e.g. attacks, damage animations, etc.). Otherwise, either forward movement information to your animator controller's parameters using ORK's Mecanim setup.
    For root motion, use the Button player controls with root motion setup (e.g. as it's used in the 3D Action RPG tutorials). Or any custom control that handles that for you (e.g. if something for that came with your animations).
    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 November 2022
    Does anyone know how to escape blanks in Parameter Names? (I'd like to send the parameters into the animator controller via ORK, Animations, Mecanim Animation, Parameter).

    - VelocityX / VelocityZ does not work
    - Velocity X / Velocity Z does not either

    Post edited by thomas123 on
  • edited November 2022
    @gamingislove Explosives animations are triggered by events (the included controller does the same). One of the controllers will check handle the queue of animations / actions. That would be the easiest way.

    Where and how would I configure this in ORK? I'd like to send an command like in the following code example to trigger an animation.

    Code Example:


    // Check if can start Attack Action.
    if (!rpgCharacterController.CanStartAction(HandlerTypes.Attack)) { return; }

    // Left weapon.
    if (rpgCharacterController.hasLeftWeapon
    || (rpgCharacterController.leftWeapon == Weapon.Unarmed && rpgCharacterController.rightWeapon == Weapon.Unarmed)) {
    if (GUI.Button(new Rect(25, 85, 100, 30), "Attack L"))
    { rpgCharacterController.StartAction(HandlerTypes.Attack, new AttackContext("Attack", Side.Left)); }
    }
    // Right weapon.
    if (rpgCharacterController.hasRightWeapon
    || (rpgCharacterController.rightWeapon == Weapon.Unarmed && rpgCharacterController.leftWeapon == Weapon.Unarmed)) {
    if (GUI.Button(new Rect(130, 85, 100, 30), "Attack R"))
    { rpgCharacterController.StartAction(HandlerTypes.Attack, new AttackContext("Attack", Side.Right)); }
    }
    // Two-handed weapon.
    if (rpgCharacterController.hasTwoHandedWeapon) {
    if (GUI.Button(new Rect(130, 85, 100, 30), "Attack"))
    { rpgCharacterController.StartAction(HandlerTypes.Attack, new AttackContext("Attack", Side.None)); }
    }
    Post edited by thomas123 on
  • ORK's animation setup can use Custom Settings to call code of your animation system.
    You might need a wrapper script between ORK and the animation system if there are no functions that can be called from ORK that way.
    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 November 2022
    Well, I just did this tutorial: https://orkframework.com/guide/tutorials/3d-action-rpg/02-player-setup/ to have a baseline to start from. I did everything like described in the link.

    But it seems that I messed up something in my configuration. Something that is not needed (yet) at this point.

    It's the same behaviour as with the Explosive controller:
    - The animations are playing correctly now
    - But the player is stuck at the place
    Post edited by thomas123 on
  • Are you using the 3D action RPG's assets for this or your own combatant prefab and animations?

    The 3D action RPG uses root motion for the actual movement, i.e. the movement comes from the animations. Make sure your combatant's Animator component is set up for that (and your animations use them).
    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 for your help.

    I am doing the 3D Action-RPG Tutorial but try to bring in my own assets (Synty Modular Character and Explosive Animations).

    The Animator is now setup for this (copied from Action Tutorial and replaced the Animations). And the prefab now uses the correct animator controller. Because of this, the default animation switched now to "walking". But still stuck.
    I compared the tutorial (multiple times) with my setup and found one difference (Control Behaviour, which I deleted).

    So it must be a different option to look for?

    2022-11-16-15-15-30

    Bildschirm-foto-2022-11-16-um-15-02-51

    Bildschirm-foto-2022-11-16-um-15-04-35

    Bildschirm-foto-2022-11-16-um-15-05-38

    Bildschirm-foto-2022-11-16-um-15-07-00
  • edited November 2022
    Edit: Nope. The motion came from my manual entry for the speed parameter in the controller. So it seems, that the inputs won't be forwarded.

    Edit 2: Found it. The spelling for my "Forward Speed Parameter" did not match the one in my animator controller.

    Thanks for your help (I guess I have to send a beer over)!
    Post edited by thomas123 on
  • So, all good for now?
    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!
  • Yes, thank you :-)
  • @gamingislove I almost understand the animation integration into ORK I guess. But I have to ask another question, sorry.

    I copied the finished ActionRPG (only the ORK folder without assets) as a template and replacing with my own prefabs and animations now. This works quite well, my Chomper is a Spider now (I am here: https://orkframework.com/guide/tutorials/3d-action-rpg/05-enemy-chomper/). The spider patrols and makes sounds and plays the idle animation.

    But it will only play the default animation (idle) and not the walking (and I guess the attack animation either). So it seems, that the animations aren't triggered correctly.

    At first I configured the spider animations manually (Base/Control>Animations>Spider) and set these animations for the spider combatant (Combatants>Combatants>Spider>Animations&Movements>Animations). This already worked for the Ellen/Player Combatant.
    The second time I generated the the spider animation setup from the controller (the setup is different from my manual one).

    But the spider won't play the walk animation and I have no idea why. I guess it has something todo with the animator controller.

    Could you give me a hint what I am doing wrong? It should work?

    Bildschirm-foto-2022-11-20-um-10-20-10

    Bildschirm-foto-2022-11-20-um-10-22-09

    Bildschirm-foto-2022-11-20-um-10-22-30

    Bildschirm-foto-2022-11-20-um-10-21-33
  • Is that combatant using auto animations to play idle/walk animations? If not and you don't forward the movement speed (in the ORK Mecanim animation setup) and play animations based on that, there's no way for the animator to know it should play that 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!
Sign In or Register to comment.