• Is your orange Layer Default State on your Battle Layer set to Empty with no animation assigned?
  • How do you switch to the battle stuff - e.g. if it's based on a parameter/transition, you naturally need to change that back.
    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!
  • @Scyra - yes!! It’s like your reading my mind. And when I find my character in the hierarchy while the game is running, and click on its animator controller, I see that I’m both in the empty state on the battle layer (actually it zooms through entry -> empty -> exit constantly on that masked battle layer - but also shows I’m in the base layer locomotion state as well. I’m thinking of dialing this all into one layer somehow, it’s crazy how long you can spend screwing around with the Animator hahaha
  • I think maybe your Battle Idle needs a transition to the Exit node. You can try it during Play Mode to see if it immediately brings your character out of the stuck idle pose.
  • edited May 2022
    Hey GiL, I'm using Play Mecanim Animation nodes and I'm trying to get the Duration Type: Animation Clip to work with Use State Name checked. It works with it unchecked and manually typing in the animation clip name. It would be nice for swapping animation override controllers if I could get it working by state name, though.

    EDIT: On the base layer the animation cancels early back to idle. As a workaround, I got the animation to play successfully on an override layer.
    Post edited by Scyra on
  • @gamingislove @Scyra - so I fixed my issue last night. I ditched Keldryns tutorial as I (at this point) had no use for Animator layers. Instead, I made a simple mecanim animator controller for just locomotion in the field. This simply forwards Speed and character walks on the field no problem. I then created a second controller for the character called Battle to handle battle states like idle cast etc. I used the “Change Animator Controller” function in the animation type in my ork settings for both my field and battle animation types. This works great, but I do see on the console that when I switch into a battle mode, the console gives me warnings about the SetFloat value from my field locomotion controller. GiL - is this because of how changing the controller works in ORK that it still is looking for the disabled controller? Hope this makes sense, otherwise I’ll make a video for you then.
  • @Scyra - can you post screenshots of your animator setup? As well as the schematic? Curious as this sounds like what I’m doing.
  • edited May 2022
    I doubt it's useful to you, but I'll post it for people who are doing 3D grid battles.

    image
    image
    image

    It doesn't look like much, but it was a pain to figure out how to smooth the sharp 90 degree turns that come with the tutorial GridMove schematic. Like, you have to have 0s Wait nodes or the animations might not play. The 0.2s Rotate To nodes in combination with an override layer weighted at 35% and an Avatar Mask so that just the upper body plays a turn animation while running was the solution to the problem. I tried blend trees and all kinds of complicated things before this and spent a lot of time like you.

    My Attack schematic isn't shown, but it's currently set up to Play (CrossFade) Mecanim Animation so there's no need for Any State transitions or conditions (which are processed every frame and could tax the CPU if there are many).

    EDIT: In the Grid Move Schematic shown above, the second set of 0s Wait nodes I used after playing the animations turned out to be useless, so I've since removed them. Also, sometimes 0s is not long enough of a wait, like when checking height differences.
    Post edited by Scyra on
  • edited May 2022
    @gamingislove - totally ditched the layers - the new 3.3 override feature is amazing, resolved this entire issue. From a backend perspective, how is it overriding? The reason I ask is since I switch controllers for my now separate battle animator, i get constant warnings about Parameter Hash xyxyxyxyx does not exist for UnityEngine.Animator:SetFloat - which i take it is the Speed float from my other controller (locomotion/field animation)?

    Long story short - since I own ORK now, I can get the source code right? How am I unpacking it so I don't have to bother you as I'm sure you're busy and I can work a lot of this out through debugging. I love this product man, seriously!

    btw - just bought Footstepper... you're an absolute genius.
    Post edited by theProject on
  • @Scyra
    Getting the animation duration via the state name only works if the state name matches the animation clip name. This setting is basically a shortcut to using the same name and not having to type it in again.
    There's no way to access the animation clip of an animator state, that's why this whole animation duration system is needed - Mecanim is somewhat of a mess, always has been.

    @theProject
    It simply changes the animator controller of the Animator component of the combatant.
    For this to work correctly, your animator controllers should somewhat match each other, i.e. have all parameters and animations available that are used by all the combatant's animation setups. I'd recommend to have a base animator controller with everything defined and use animator override controllers based on it to just swap out animation clips.

    Yes, full source code for ORK and Makinom is included in ORK 3. The combatant's animation handling is mainly managed by the CombatantAnimations class.
    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!
  • @gamingislove
    Thanks for explaining it. I found out that if I play an animation state on an override layer it will simply play out the full clip duration, regardless of duration type settings. That's basically the functionality I was after. All is well.
  • edited August 2022
    Sorry to necro this for a newb question..
    It simply changes the animator controller of the Animator component of the combatant.
    For this to work correctly, your animator controllers should somewhat match each other, i.e. have all parameters and animations available that are used by all the combatant's animation setups. I'd recommend to have a base animator controller with everything defined and use animator override controllers based on it to just swap out animation clips.
    Edit nevermind, I didn't understand what the animator override controller was.
    Post edited by GeneralK on
Sign In or Register to comment.