Game Development Community

Turn the character

by Erik Madison · in Artist Corner · 07/25/2005 (2:47 pm) · 3 replies

This is actually a half code/half modeling question, but I'll post it here....
I'm trying to get an animation working when the player turns, but I'm not really sure what type of animation it should be, nor how I should be calling it.
At first I thought it's fairly similar to a headturning, so I hacked away at updateLookAnimation() and created a single blend with left turn through right turn. That didn't get called often enough it seemed, and the animation appeared to be a bit too complex for a blend handled via thread.setPos(). Perhaps it should be an action instead? I tried two blends this time, a left turn, and a right turn. I also tried this with making them both cyclic non-blends. For this call, I went to just after the move checks in pickActionAnimation() and check that mVelocity.len() is 0 and mRot.z isn't. This does somewhat work, except the player seems to 'jerk' through part of the animation, if it even gets called at all. Well, it always does get called, but not nearly often enough to make it smooth at all. I thought perhaps it was due to the final setActionAnimation() being set for non-wait, so I added a new direct call to that with hold and wait being true, and returning before the rest of the function has a chance to screw it up. This really didn't seem to make any difference at all. Bah, I expected at least a horrible mess, not a nochange.
Has anyone done this? If so, what type of animation did you use, and where did you call it? Please? :)

#1
04/15/2007 (8:17 pm)
In case you haven't figured this out in the past 2 years (your thread was the only thing I saw when I went searching for a solution) ... I just posted a resource for this little oversight in the player class. It isn't up just yet but it should be listed as Player Stand and Turn Animation.
#2
04/30/2007 (9:54 am)
@Jeremy

Did your resource ever get posted? I'm extremely interested in your resource, but I haven't seen it yet.