Animator.crossFade ?

Haytam95

Active member
Hi

I'm working with the Animator (Yeah, still) and I'm giving up by how quickly it becomes messy passing IDs around and configuring transitions. Also there are times when the transitions break after doing weird operations (Attacking, while toggling aiming and attempting to jump).

Here is an example from the Demo (I know, it's just an example, but it's crazy that a few knife attacks are this complicated to setup)

1628088407459.png

I started a simple prototype (without UCC) trying to just use "Animator.crossfade" to perform basic actions and it feel simpler. Also the animator was less prone to fail (Yeah, some random animation could fail because I'm shit working with the animator, but then if the action change or with an Animator monitor it would be fixed).

Is there any way that I could use Animator crossfade within UCC for certains actions (Abilities, weapons and movement)?

If not, thinking out of loud what could happen if we keep the functionality to define the different ID but also add the option to directly define an "Animator state" (In abilities, weapons, etc.) and if that field is setted up, just jump to that state without messing around with the IDs? To avoid string error, maybe define an scriptable object that contains a string with the state name.

I feel like the character controller is pretty useful and I love most of it's features (States, camera work, abilities, IK), but not the animations and IDs part. I really tried to like it, but no way. When adding weapons it becomes really messy very fast, and debugging the animator is a pain (And I've been using it since 2019, so I worked a lot with it)

I really think that this could be an improvement to the overall of the character controller, since the IDs thing are everywhere

P.S: I would like to clarify that I'm not attacking the controller or anything else, just thinking how we could improve it
 
Last edited:
In version 1 of the controller I programmatically changed transitions using something similar to Animator.Crossfade. This had it's own downsides in that you had to script each state that it transitioned into and ended up not being as flexible as using the animator the way that it was originally designed. While the animator can become a spaghetti mess I've found that this method is better in the long run.

With that said, I'm sure you could change it back to transitioning with script but it would be a good amount of work to do correctly. You'll need to start within the AnimatorMonitor.
 
Top