Game Development Community

Help with successfully playing new animation sequences

by Duane Richards · in Torque Game Engine · 02/27/2002 (5:55 pm) · 1 replies

Hey, all!

I have been successful in getting new moves into the engine, like crouching, going prone, and leaning, rolling, etc. It has been quite a project, but I have learned a lot.

I am still stuck on one thing, though. Apparently, the code in Player.cc calculates what sequence to play based on a matrix calculation for velocity (direction and speed). This method was fine when there were only four animations (root, forward, back, and sidestep), but now I have a bunch of new moves implemented in the engine and am still having a hard time figuring out how to calculate the velocity to select the right animation.

Does anyone know how this code actually works and how I can modify it based on speed or something else? (I slowed down the run speed of the player, and now when walking uphill, it plays the backstep animation!)

Any help would be appreciated. The code is in the Player::pickActionAnimation() method in the Player.cc file.

Thanks!

#1
08/24/2002 (2:47 pm)
Roll Right

1. Accept input
2. Decode "Roll Right" keystroke
3. Cease all animations
4. Apply Impulse
5. Begin Roll Right Animation
6. Wait for animation complete
7. Goto 1

Roll Left

1. Accept input
2. Decode "Roll Left" keystroke
3. Cease all animations
4. Apply Impulse
5. Begin Roll Left Animation
6. Wait for animation complete
7. Goto 1

these are just sample flows. Give you any ideas?