extern void object::Move( )
{
	object	target;
	point	p;
	float	m;

	errmode(0);  // ne stoppe pas si erreur
	while ( ismovie() != 0 )  wait(1);

	while ( true )
	{
		target = radar(Car);
		if ( target != null and
			 distance2d(position, target.position) < 100 )
		{
			Rotate(target);
		}
		wait(1);
	}
}

// Slow rotation.

void object::Rotate(object target)
{
	if ( direction(target.position) < 0 )
	{
		motor(0.2, -0.2);
		while ( direction(target.position) < 0 )
		{
			wait(0.1);
		}
	}
	else
	{
		motor(-0.2, 0.2);
		while ( direction(target.position) > 0 )
		{
			wait(0.1);
		}
	}
	motor(0, 0);
}
