Posted By: romin2011
camera smooth turn prolem - 06/06/11 18:06
Hello!
This code smoothly turns an entity toward target entity, but if i use it to turn the camera smoothly toward the target entity(turn the camera independent of any player etc) the camera keeps turning doesn't stop reaching the target angle?
This code smoothly turns an entity toward target entity, but if i use it to turn the camera smoothly toward the target entity(turn the camera independent of any player etc) the camera keeps turning doesn't stop reaching the target angle?
Code:
VECTOR a,b; vec_diff(a,cover.x,my.x); vec_to_angle(b,a); camera.pan+=ang(b.x-my.pan)*0.3*time_step;