how to mix animations

Grab your favourite IDE and tinker with the innards of game engines

how to mix animations

Postby netserk on Fri May 18, 2007 11:36 am

I have two animations of my third person avatar. One where he runs and one where he is swinging his arm. Is it possible to mix the animations in some smart way so he can run while he swings his arm.
netserk
Member
Member
 
Joined: Sun May 13, 2007 12:39 pm
Location: Aalborg, Denmark

Postby Mr. Happy on Fri May 18, 2007 12:33 pm

is the arm swinging a punch attack?

Does third person avatar = your making a third person mod and this is the player model?

OR

= this is a multiplayer mod

OR

= this is a custom npc

Different answers for each, I only know one though.
Image
-You've just been happified!?
User avatar
Mr. Happy
Forum Goer Elite™
Forum Goer Elite™
 
Joined: Sat Dec 30, 2006 9:20 am
Location: Flyin' thru "da cloud" in the MotherShip

Postby netserk on Fri May 18, 2007 12:54 pm

It is a singleplayer game and the third person avatar is the player model controlled by the player.
The arm swinging is not an attack only an animation.
netserk
Member
Member
 
Joined: Sun May 13, 2007 12:39 pm
Location: Aalborg, Denmark

Postby ChopperDave on Fri May 18, 2007 1:40 pm

User avatar
ChopperDave
Rockstar San Diego
 
Joined: Wed Feb 21, 2007 6:06 pm

Postby netserk on Mon May 21, 2007 9:57 am

I found a solution using addlayer and weightlist in the qc-file:

Code: Select all
...
$weightlist no_body "jRoot" 0.0 "jPelvis" 1.0
$weightlist no_legs "jRoot" 1.0 "jPelvis" 0.0
...
$sequence Run "run" activity ACT_RUN 2 loop weightlist no_body
$sequence Swing "swing" activity ACT_SWING 2 weightlist no_legs
...
$sequence Swing_SwingTest "run_and_swing" activity ACT_Run_SWING 2 addlayer Run
...


This blends the body of an animation with the animation of the legs from another sequence.
netserk
Member
Member
 
Joined: Sun May 13, 2007 12:39 pm
Location: Aalborg, Denmark

Return to Programming

Who is online

Users browsing this forum: No registered users