Hey!
I’m trying to trigger an animation on a button press, unfortunately it doesn’t seem to respond within a decent amount of time - let alone the near instantaneous behavior I’m looking for. Basically player presses a button and I expect him to change from one animation state to the other. However it takes way too long (haven’t actually timed it) for it to happen.
Here’s the code (called from a method that is called in the Update() loop)
if (_nextGem != null && Input.GetKeyDown(_laneButtons[NOTE_LANE.Bottom])) {
_gemSmashers[(int)NOTE_LANE.Bottom].GetChild(0).GetComponent<GemSmasher>().onSmash();
checkHit(NOTE_LANE.Bottom, (Time.time * 1000.0) - _start);
}
.
.
.
private void checkHit(NOTE_LANE lane, double time) {
_characterAvatar.SetTrigger("RideToOlly");
.
.
.
That’s the only code that deals with animation currently.
Attached are some pictures of the animation controller.
I’m not sure if this is an issue with my code, or with how I’ve handled the transition in the controller. I’ve tried adjusting the exit time in the transition, I’ve tried the different update modes, etc. Nothing seems to be having an effect. =S
Help would be appreciated!