edited August 2022 in ORK Support
Hello there,

I'm new to Ork Framework and I'm trying to build a 2d top-down RPG. I have followed the 2d grid-based battle tutorial and I've started a new project from scratch to try and recreate some basic steps by myself. However (and I know this is stupid) I'm stuck with basic animation settings for my player (although I really tried to recreate the 'Princess' setup).

Here are some screenshots:
Player Animation setup : https://ibb.co/dDMTKDL
Player Animation setup : https://ibb.co/dbBt165
Animator states : https://ibb.co/7RZSspg
Animation types general settings : https://ibb.co/1sVprSM
Idle blend tree : https://ibb.co/WvB1hKH
Walk blend tree : https://ibb.co/3WhP1Zc
Walk -> Idle transition : https://ibb.co/ZdT5Mhj
Idle -> Walk transition : https://ibb.co/yyVSxDK
Result on play : https://ibb.co/t4nQ0w1

When I hit play, my Player is able to move (I've added the 2d top down controler) but no animation is played. Also, when I try to change moveX,Y or Speed values in the animator while in play mode, nothing happens neither. I'm not quite sure but I feel like my key inputs don't translate properly into Animator parameters.

I'm sure this is easy to fix, sorry for the noob question!

Thanks for your help in advance!
Post edited by malho on
  • Did you set up the combatant's animation setup correctly? Either in the general settings for all combatants or in the individual combatant's settings.
    E.g.:
    - using Mecanim animation system
    - have the player animation setup added to it
    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 reply.

    So basically here is what I have set up:
    - Combatants > General Settings :
    Defaut animation system > System type > Mecanim;
    Defaut animation > Animation 0 > Animations: 0 Default Mecanim ;
    Auto animation > Use auto animation: Enabled;
    Default Movement Component > Component type: Default + Add Component Enabled;

    - Combatants > Player:
    I added my player prefab (with an animator on it with 'Apply root motion' Disabled;
    In Player > Animations & movement: all checkboxes disabled (because I don't want to override the base setting);

    - Base/Control > Animation : I created 0: Default Mecanim
    Mecanim settings > Auto parameters (see image): https://ibb.co/HDvPrH8
    Then I added 2 mecanim animations for Idle and Walk states: https://ibb.co/fQrVpzy and
    https://ibb.co/vmJ9R2g
  • edited August 2022
    Don't use auto animations - since you forward the movement speed to your animator controller and play things based on that, the auto animations (wich play idle and movement animations) will mess things up for your setup.

    Also, you don't need to set up the idle/walk animations in this setup, since this is handled by the move speed being forwarded and the animator controller playing the blend trees based on that :)
    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!
  • edited August 2022
    Alright I disabled the auto animation in combatant > general settings and I remove both Idle and Walk animations... but it's still not working for me.

    The animator itself seems to be working properly: when I try to manually tweak the animation parameters in my prefab editor view, the animations are played as expected. It really seems that my input keys do not translate into the animator parameters in game mode which is weird. Maybe I missed something in the project settings?

    Just so that you know, I'm using an azerty keyboard so I changed horizontal move keys to Q and D, and vertical move keys to Z and S (both in Unity's project settings and in base controls > Input keys).
    Post edited by malho on
  • The value are automatically calculated based on the combatant's position changes each frame, so that shouldn't really matter.

    However, make sure to use the correct Update Mode in your combatant's prefab settings. E.g. using the 2D top down controls you'll need to use the Fixed Update mode here (e.g. also used in the 2D tutorials) since the combatant is moved using a rigidbody.
    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 August 2022
    Alright so I finally found a way to make it work. My player was already in Fixed Update mode, so i tried to re-import the princess from your asset pack and set it up again from scratch.

    When spawning my princess, I also had a clone spawning at the same time, which was due to the fact that my playerSpawn schematics was used as a start schematic + I had enabled the 'Start game' option on the Game starter in my scene.

    I finally reused the princess prefab and replaced the sprites with my player sprites.

    I'm really not sure how I fixed this to be honest but I'll be more careful with the game settings next time. Thank you very much for your assistance on this, I really appreciate it.
    Post edited by malho on
Sign In or Register to comment.