Entity der Maus hinwenden

Posted By: Martek

Entity der Maus hinwenden - 10/24/07 18:11

Hallo alle zusammen,

ich probiere im Moment, das sich ein Entity immer das Maus zuwendet. Leider habe
ich damit keinen erfolg. Weiß jemand wie das geht, oder hat einer ne Idee
wie das gehen könnte???

Mfg, Pingulord
Posted By: Scorpion

Re: Entity der Maus hinwenden - 10/24/07 18:44

habe ich :]

Code:
function rotate_to_mouse()
{
vec_set(temp,vector(mouse_pos.x,mouse_pos.y,5000));
vec_for_screen(temp,camera);//world cood
c_trace(camera.x,temp,ignore_passable);
vec_set(temp,target.x);
vec_sub(temp,my.x);
vec_to_angle(temp,temp);//now points from me to mousepos
my.pan = temp.x;
}


Posted By: Martek

Re: Entity der Maus hinwenden - 10/24/07 19:17

Videlen Dank.
Funktioniert alles super...
© 2023 lite-C Forums