Or even simpler:

Code:
action thinginfrontofplayer()
{
	while(1)
	{
		my.x = sin(player.pan) * 64 + player.x;
		my.y = cos(player.pan) * 64 + player.y;
		my.z = player.z;
		wait(1);
	}
}



... where 64 is the distance from the player to that object.


Always learn from history, to be sure you make the same mistakes again...