How to follow the vehicle

Hi,

I have a game where the game screen is only 640x520, how ever the track is much longer, i want the focus to remain on the vehicle when it moves in the track and moves out of the 640x520 area, here is what i gave done reading various threads here at forum , i override the scrollRotation method in world class as below and as suggested by mayo...


public override function scrollRotation():Number {

scaleX = focus.scaleX;
scaleY = focus.scaleY;
return focus.rotation;

}


but still the focus does not remain on vehicle and i am unable to follow it all along the track...
Any help will be highly appreciated ...

Regards
Jin

Original thread: https://box2d.org/forum/viewtopic.php?t=8820