Posted By: bk9iq
Rotate toward an object with collision .... - 01/18/11 02:10
Hello everybody,
This is probably the most noob question ever but I still can't get it to work...
I am using this to make my enemy rotate toward the player however I want to add collision so that it doesn't go through the walls when turning::
I tried c_rotate but didn't work:
Any ideas please...
This is probably the most noob question ever but I still can't get it to work...
I am using this to make my enemy rotate toward the player however I want to add collision so that it doesn't go through the walls when turning::
Quote:
vec_to_angle(my.pan,vec_diff(NULL,player.x,my.x));
I tried c_rotate but didn't work:
Quote:
vec_to_angle(pan_enemy.pan,vec_diff(NULL,player.x,my.x));
c_rotate(my,pan_enemy.pan, NULL);
c_rotate(my,pan_enemy.pan, NULL);
Any ideas please...