# Controls for physics-enabled game object

I'm trying to put together 2D game on Flash ActionScript. Game objects positions are updated by physics library and I'm trying to control them applying forces and updating these forces every frame.

Right now I'm pondering how to control a helicopter. I'm using concept of throttle and target height. To make heli float on constant height, I'm applying force of

F0 = -m * gy

which negates gravity for it. To make it move up or down, target height is used - it is increased with up key and decreased with down key, then the heli should ascend or descend to it. The problem is transitional process - right now the heli misses target height and then oscillates around it.

In short: how to control body with forces to make it move from point A to point B and stop there? Here's how I'm controlling it now:

    public function update(time:int):void
{
lastUpdate = time;
var deltaY:Number = targetHeight - body.graphic.y;
throttleMark.y = targetHeight;
//force for stable floating
var antigrav:Number = -body.gmass * body.space.gravityy;
//   (in fact, too small, but higher scale make heli move very slowly)
var damping:Number = -body.vy * body.vy * body.vy * 0.5;
var attraction:Number = deltaY * 1000.0;
var totalForce:Number = antigrav + attraction + damping;
body.applyRelativeForce(_strafe, totalForce, 0.0, 0.0);
}