Hello,
I have set up Mecanim animations for all combatants in my project. Everything works smoothly as far as I can tell, except one hiccup -- if I walk off of a ledge without jumping, my character will go back to the Idle animation (the default state in the animator) and continue moving. It doesn't happen if I land while in a jump animation. Here's what I mean:
I originally set my settings following the Gameplay tutorial guide (
http://orkframework.com/tutorial/gameplay/mecanim-animations/), and later followed a posted tutorial that goes more in depth (
http://forum.orkframework.com/discussion/5215/tutorial-ork-animations-using-mecanim-my-all-new-comprehensive-guide) but still get this problem regardless.
This happens regardless of my character controller settings, the prefab character I use and whether or not I use Speed Change Delay, just to name a few things I've tried.
Here's my animation settings for the combatant:
free image hostingI apologize if this ends up being more of a Unity problem than an ORK one, but I can't seem to find a post of anyone else having this problem.
Thanks!
How's your find ground set up?
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
However! If I set it to none and then add a Place on Ground component to the character, it works perfectly EXCEPT with my jump animation. Now falling off of ledges doesn't trigger idle, but any time you jump you will do the same idling thing.
Looking at the animator while playing, the jump animation is being called by the state name as I have set it up to do, but then there's an awkward wait of about a second, then it goes back to "entry" which goes back to the default state, idle. This may just be me being unfamilar with the animator... but shouldn't ORK's auto move still recognize when the character is moving and play a run/walk animation?
I messed around with some threshold to help, but I never managed to get it working perfectly. like 20% of the time that ledge would still result in an idle hover.
Are you using the built-in Button player controls? If yes, you can try enabling the Play Fall Animation and Play Land Animation settings in the control's settings (Base/Control > Game Controls).
Otherwise, you can also not use the auto animations and either use a custom script for these kinds of animations or use the animator controller for it. You can e.g. pass on movement speed and rotation information to your animator controller via the Auto Move Speed Parameters and Auto Rotation Parameters in ORK's mecanim animation setup.
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Switching my character's Find Ground Settings to none and placing a Place on Ground component did fix my ledge problem, and gave me a jump problem. I've since remedied my jump problem somewhat by having it play the run animation after jumping, which works as long as you are moving and jumping at the same time -- but if you jump while stationary, the looped run animation will play and you'll just run in place until you move in any direction.
I could set a condition for the transition from Jump to Run, that condition being that the character is moving. Sorry if this is a dumb question, but I've only written a handful of lines of code in my life and I haven't tried ORK scripting yet: is there an existing float or something that determines if the character is moving forward, and if so could I write a parameter that would determine that for the animation transition?
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!