Game Development Community

Basic player animation

by University of Laval (#0003) · in Torque Game Engine · 10/21/2007 (5:20 pm) · 2 replies

Hi all,

I have a simple goal to stop the player from moving, move the camera and play a looping animation on keypress, which can be re-pressed to return into normal mode. I've already managed to move the camera as I want it, now I want to stop the movements and play an animation.

I tried to call setState and set it to a new empty state. This way the player stop moving and can still rotate to look around, that's exactly what I want. Unfortunately, when in another state the player animation seem to completely freeze. I'm wondering if it's the right way to do this.

Finally I want to play a full body non blended looping animation. I've tried to call playThread, setActionThread, mShapeInstance->setSequence and mShapeInstance->transitionToSequence with the "fall" anim as a dummy for now but nothing seem to register. After reading some posts I understood that when the player is on ground, the strafe/run/back procedural anims take control over everything so it's why I don't see it. How can we prevent this? Ain't changing the player state supposed to do it?

Thanks

About the author

Recent Threads


#1
10/21/2007 (7:05 pm)
To stop the player from moving, you could temporarily un-bind the movement keys. And setActionThread should work. Are you getting any console errors?
#2
10/22/2007 (12:53 pm)
Is there any advantage to un-bind and re-bind keys over changing the player state? I knew I could do it but I though it was more logic to change player state.

And about setActionThread, no I don't get any console message, I even debugged it and it reached reach setSequence in that function, but nothing happen on-screen (player continue to idle).