Game Development Community

Lower body animation triggering upper body animation?

by Will Sanders · in Torque Game Engine · 07/17/2002 (4:26 pm) · 2 replies

I want to play a upper body animation for when the lower body is running. I have one upper body animation where the player has a weapon, and one where the player doesn't. After reading past forum topics since November, I figure I need to put this somewhere:

%obj.playThread(0,"upperbody");

... where "upperbody" is the animation name (without the weapon). But where should I put it to make sure it starts when the legs start running? And how would I switch animations when the player loses/picks up a weapon?

Sorry if this is a stupid question, but I'm a modeler and coding sometimes eludes me. :'(

#1
07/17/2002 (5:49 pm)
I wrestled with this problem for a long time and I never came up with a straight up solution. My game incorporates melee combat and I wanted my player to be able to swing a sword while running. I tried using the ActionThread and the playThread function but nothing actually worked. The upperbody animations would play perfectly until I started moving then they would just stop, even when the lowerbody animations controlled only the legs and the upperbody animations controlled only the arm. I even tried using blend functions but those did even worse. The only solution I can offer you is a sort of hack that I ended up using. There is a recoil thread which animates when you fire a weapon, and there 3 different levels of recoil: light, medium, and heavy (while medium and heavy are coded, light is the only recoil currently used in the game). I ended up giving my player a second rifle in his left hand which he starts the game with, but which I don't render (aka it's invisible). This rifle has unlimited ammo and doesn't fire any projectiles, but it does have a recoil, which is my swing animation. One thing of note, however, is that any nodes which you animate in the recoil animation don't seem to move in any other animatin, so cull out as many nodes as you possibly can in the export of your upper body animation. Hope this helps.
#2
07/19/2002 (7:57 pm)
Thanks Robert. Unfortunately, I think my best option is to just have full body animations than try to synch upper and lower parts with different animation files. Unfortunately, I came across another problem which I'll address in another post...