Attatching to vertexes?

Posted By: upsidedownman

Attatching to vertexes? - 10/13/08 23:42

Ok so i was trying to attach a gun to a hand using vec_for_vertex
but it never works i was just kinda throwing random lines in to see if it would work.

Can any1 tell me how to do this?And just to clarify if i attach the gun to vertex the gun will actually be able to move with the hand and not get all messed up right? because i tried doing like

gun.x = my.x + 20;
gun.y = my.y + 3;
gun.z = my.z + 5;
gun.pan = my.pan;

but it never works right because when the hand move the gun is all off. So in the manual it said that vec_for_vertex is good for attaching guns and stuff.

So can any1 help me out and show me how to do this or does any1 know a different way to attach guns to arms/hands without having to make abunch of models with the guns already on the hands?
Posted By: croman

Re: Attatching to vertexes? - 10/14/08 17:32

Code:
while(hold_gun == 1)
{
   vec_for_vertex(me, temp, vertex_num);
   // vertex_num is variable that holds the number of vertex that
   // will be used to place gun onto its position
   vec_set(gun.x, temp.x); // places the gun in proper position
   gun.pan = player.pan;
   wait(1);
}


that should work
Posted By: upsidedownman

Re: Attatching to vertexes? - 10/14/08 18:29

awesome thanks
© 2023 lite-C Forums