Posted By: CanadianDavid
Move entity towards player (pan+tilt) - 02/09/15 06:57
I would like to move an object towards the player. The following works to adjust the pan of the object so that it moves in the player's direction:However, I can't quite seem to adjust the tilt so that the object also tilts towards the player as it moves forward. Any suggestions?
Code:
vec_to_angle(my.pan,vec_diff(NULL,player.x,my.x)); c_move(me, vector(5 * time_step,0,0), nullvector, 0);