In MED: If your models have bones. Open your player model and merge the gun model ( file/merge ). Select a bone and switch into "Apply Vertices Mode". Select the vertices of your gun and press the "Apply vertices" button ( framerange should be setup to all frames ). If you want to do it by script this could look like this
Code:
void hold_gun(){ //me = a gun, you = player
..
while (me && you){
VECTOR _a, _p;
vec_for_bone (_p, you, "BoneName");//xyz pos of bone
ang_for_bone (_a, you, "BoneName");//pan,tilt,roll of bone
vec_set (my.x, _p.x); //set xyz
vec_set (my.pan, _a); //set pan...
wait (1);
}
..
}
Cheers
Last edited by rayp; 09/14/1322:57.
Acknex umgibt uns...zwischen Dir, mir, dem Stein dort... "Hey Griswold ... where u gonna put a tree that big ?" 1998 i married my loved wife ... Sheeva from Mortal Kombat, not Evil-Lyn as might have been expected rayp.flags |= UNTOUCHABLE;