Posted By: kasimir
attach weapon to player - 01/15/08 12:19
Hello - i found this code to attach a weapon to the player... it works but sometimes it is not correct. The Code uses two vertex to orient the weapon, but i think if its possible to use tree vertes it will work fine! So Someone knows a better code???
Code:
THX kasimir
Code:
while(player)
{
vec_for_vertex(temp.x,player,145);
vec_for_vertex(temp2.x,player,141);
vec_set(my.x,temp.x);
vec_diff(temp.x,temp2.x,temp.x);
vec_to_angle(temp.pan,temp.x);
vec_set(my.pan,temp.pan);
wait(1);
}
THX kasimir