can anyone plz tell me how to move a modell on the key press event???
what i am looking forward to is when i press the W key sydney starts running in an bsp and she is still when no key is pressed.. as per the idea on top of my head i need to set the setMd2animation on key press from stand to run... am i right???
a piece of code on how to do this or reference to any other threads is really appreciated...a newB out here... thanx in advance
Moving an md2 with ASWD
Pretty much you jsut need to change the FrameLoops depending on what key is being pressed.
Thats my animate character function. Not much to look at but hope you get the idea ^_^
Code: Select all
void CCharacter::animateCharacter(enum ENU_ANIM ANIMATION){
switch(ANIMATION){
case STAND:
pCharacterNode->setFrameLoop(21,59); //0-20 run, 21-59 stand,60-80 walk
isAnimated[STAND] = true;
break;
case RUN:
if(isAnimated[RUN] != true){
pCharacterNode->setFrameLoop(0,20); //0-20 run, 21-59 stand,60-80 walk
isAnimated[RUN] = true;
}
break;
}
}
Thats my animate character function. Not much to look at but hope you get the idea ^_^
Alternativly you could download :
http://www.gameputty.com/IrrWizard/
And take a look at the code that generates.
________
Medical marijuana doctor
http://www.gameputty.com/IrrWizard/
And take a look at the code that generates.
________
Medical marijuana doctor