VECTOR temp;
vec_zero(temp);
function point_mouse()
{
mouse_mode = 2;
//mouse_map = arrow;
while(1)
{
temp.x = mouse_pos.x;
temp.y = mouse_pos.y;
temp.z = 1000;
vec_for_screen(temp,camera);
c_trace(camera.x,temp,IGNORE_ME);
if(hit.x != NULL)
vec_set(my.x,hit.x);
wait(1);
}
}
action player_mouseAct(){
c_setminmax(me);
var variabel_1 = 1;
VECTOR temp; vec_zero(temp);
ANGLE my_angle; vec_zero(my_angle);
while(1){
if(mouse_left==1){
variabel_1 = 0;
vec_set(temp,mouse_pos.x);
vec_sub(temp,my.x);
vec_to_angle(my_angle,temp);
my.pan = my_angle.pan;
vec_set(temp,mouse_pos.x);
temp.z = my.z;
}
if(variabel_1 == 0){
if(vec_dist(my.x,temp)<=1)
variabel_1 = 1;
c_move(me,vector(10*time_step,0,0),nullvector,IGNORE_ME|GLIDE|IGNORE_PASSABLE);
}
wait(1);
}
}