ang_for_bone(ANGLE*,ENTITY*,STRING*)

Berechnet den aktuellen Euler-Winkel eines Bones. Das kann dazu verwendet werden um Waffen und andere Ausrüstung an einem bestimmten Bone des Trägers auszurichten.

Parameter:

ANGLE* - wird Ausrichtungswinkel des Bones.
ENTITY* - Model-Entity-Pointer.
STRING* - Bone-Name.

Modifiziert:

ANGLE* - wird Ausrichtungswinkel des Bones

Geschwindigkeit:

schnell

Beispiel:

action attach_gun_to_actor
{
var anim_percent = 0; you = ent_create("gun.mdl",0,NULL); // create a gun for the actor
while(1) {
anim_percent += time_step;
ent_animate(me,"walk",anim_percent,ANM_CYCLE); // animate the actor
vec_for_bone(your.x,my,"RightHand"); // place gun at hand position
ang_for_bone(your.pan,my,"RightHand"); // rotate gun by hand angle
wait(1);
}
}

Siehe auch:

vec_for_bone

► Aktuelle Version Online