Normal sin/cos will keep the constant distance Im thinking then modify according to taste.
distance = camera.x, spaceship.x; sort of thing to describe its 'constant'
If(vec_dist(my.x, spaceship.x) > camera_dist.x)
{
or if(spaceship_move > distance) etc...find a way to express accelleration and decelleration...

then modify for the speed differences maybe?
its probably the approach I would take and maybe will soon for follower NPC's.


Use the 'manual' Luke, the manual is your friend. 'Self reminder' smile

My WebPage