...
vec_set(tmp1,axys.x); //axys is the object
vec_sub(tmp1,TARGET); //TARGET is mouse position 3D
vec_to_angle(tmp2.pan,tmp1);
draw_text(_chr(str_for_num(NULL,tmp2.pan)),100,100,_vec(255,0,0));
in this example I made, I get close to getting! The problem is that he comes back and starts 180 sample:
1..2..160..180 | -179...-169...-2
Last edited by NeoNeper; 07/21/1316:22.
Please! Use easy words to be translated. because my English is not very good! Grateful. _______________________________________________________
Re: mouse angle over an object
[Re: NeoNeper]
#426348 07/21/1317:0707/21/1317:07
My last post was wrong.. Try looking at the var trig functions there maybe something you can do with sin and cos but my math there is bad.. And if there isn't a simple way to shift this back to 0-360* range you might ask the developer for a function, but I am sure this can be done with simple math.
Last edited by Malice; 07/21/1317:09.
Re: mouse angle over an object
[Re: ]
#426351 07/21/1317:4707/21/1317:47