Height Change ability blocking QuickStart ability?

brl0000

New member
I've got a nicely working, slightly-modded QuickStart ability that works for both walking and running movement starts. As the animations I'm using also include starting root-motion animations for crouch walking, I'm trying to have my QuickStart ability play them as well, when the player is crouched and starts moving.

I've added an equivalent state machine (blend tree) for the starting crouch-walk animations as I have for walk and run starts, created the proper transitions, and muted all other transitions that used to handle movement while crouching. But I've noticed that the height change ability seems to block my QuickStart ability from ever starting, so the correct parameters are never supplied to the animator and the state never changes from an idle crouch.

In trying to trace this back though the ability parent classes, the best I can see is that m_LastCanStartFrame != Time.frameCount in the parent class StoredInputAbilityBase, and that's returning false for CanStartAbility(). This also happens when using the stock QuickStart ability instead of my own.

m_LastCanStartFrame is set to -1 by default. But I'm unclear how that would relate to stopping motion while crouched, as it does not, when not crouched.

Anyone else run across this or a similar issue?
 
Unfortunately I haven't seen this issue before. Can you debug it to see where m_LastCanStartFrame is being set which is then preventing the ability from starting?
 
Thanks for the reply Justin. I think I was incorrect in my initial guess as to where this is coming from. The QuickStart class itself is returning false for its CanStartAblilty() method. As I try to move the character from an idle crouch, CanStartAbility() sees m_InputCount > 0, meaning the method considers the character already moving, so it returns false.

I also noticed that directly preceeding this error, as I pressed any movement key, I was getting a warning in the console about the AnimatorMonitor not being able to set the speed parameter: "Parameter 'Hash -823668238' is controlled by a curve."

I've looked at the animations (I'm using Kubold Movement Animset Pro) and found no animations attempting to animate the Speed parameter, so I'm at a loss as to why I'm seeing this.
 
The LegIndex parameter is controlled by a curve, not the Speed parameter. Are you sure that's the correct parameter that it is complaining about?
 
Yes, per the console stack trace for the warning, it appears to come from AnimatorMonitor:SetSpeedParameter():

Parameter 'Hash -823668238' is controlled by a curve.
UnityEngine.Animator:SetFloat (int,single,single,single)
Opsive.UltimateCharacterController.Character.AnimatorMonitor:SetSpeedParameter (single,single,single)

(Apologies, as the forum won't allow me to paste any more of the stack trace from the Unity console. It doesn't appear to like the Unity hyperlinks, even when I paste into Notepad first, then cut & back into the reply, the reply refuses to update.)
 
Last edited:
Hmm, the only reason why you'd get that error is because another animation is controlling the parameter by a curve. I would start to debug this by doing a grep search on all of your animation meta files and seeing which animations use that parameter.
 
Thanks for the suggestion. I've done a batch grep on every .meta file in my project, and the only files that include "Speed" are some speedTree .meta files that aren't in the scene and have nothing to do with the animator. I've tested the grep process with "LegIndex" and it finds all the .meta files pertaining to those animations that have that curve. So it looks like it has to be something else.
 
Really strange. My only other suggestion would be to remove the animations until you figure out which one is causing the issue. Unfortunately I'm not sure of another way to determine the cause.
 
Back
Top