Skip to content

Instantly share code, notes, and snippets.

@bradya
Created September 19, 2011 00:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bradya/1225784 to your computer and use it in GitHub Desktop.
Save bradya/1225784 to your computer and use it in GitHub Desktop.
Glitch Run - Jump landing animation glitch
Issue:
We run the landing animation once we hit the ground. In Glitch, it doesn't look like we run this animation (from what I can tell, we need to talk to Eric) when we land from a normal height jump.
Observed incorrect behaviors because of this:
- It takes about a third of a second to actually look like we're running again when we're running, resulting in animation inconsistent with Glitch
- Landing on a rock, then falling directly down to the ground causes the character to glitch out a bit
Results of fix:
The character landing animation looks more consistent with how Glitch performs landing. That said - there are still animation issues. Although I wasn't able to consistently reproduce it, the character can get caught in the falling animation (also not sure if this is a result of this fix, we need to investigate)
Follow-up items:
- Find out from David what direction he got from Eric regarding jumping, if any, and adjust fix accordingly - reorganizing the changed code properly
Before:
2011-09-18 17:40:27.328 GlitchRun[99109:c503] Show animation: Running
2011-09-18 17:40:27.717 GlitchRun[99109:c503] Jump!
2011-09-18 17:40:27.718 GlitchRun[99109:c503] Show animation: JumpOverLift
2011-09-18 17:40:28.179 GlitchRun[99109:c503] Show animation: JumpOverFall
2011-09-18 17:40:28.546 GlitchRun[99109:c503] Landed
2011-09-18 17:40:28.546 GlitchRun[99109:c503] Show animation: JumpOverLand
2011-09-18 17:40:28.896 GlitchRun[99109:c503] Show animation: Running
Changed GlitchAvatarAnimationTypeJumpOverLand to GlitchAvatarAnimationTypeWalk2x:
-(void)landAndWhenComplete:(void(^)(void))landComplete
{
_avatarState = GlitchAvatarStateManual;
[self showAnimation:GlitchAvatarAnimationTypeWalk2x withCompletionBlock:landComplete];
}
After:
2011-09-18 17:44:44.757 GlitchRun[99240:c503] Show animation: Running
2011-09-18 17:44:45.699 GlitchRun[99240:c503] Jump!
2011-09-18 17:44:45.700 GlitchRun[99240:c503] Show animation: JumpOverLift
2011-09-18 17:44:46.156 GlitchRun[99240:c503] Show animation: JumpOverFall
2011-09-18 17:44:46.306 GlitchRun[99240:c503] Landed
2011-09-18 17:44:46.307 GlitchRun[99240:c503] Show animation: Running
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment