Graphic falling out of sync

Hi,

I am having a problem where my graphic will fall out of sync with the physics object.
I will try to post the relevant code so hopefully someone more experienced with Box2d can let me know what is going on 🙂

The physics loop runs in its own update at 60hz.
Code:
      private function updatePhysics(e:Event):void
      {
         //step the physics world
          pWorld.Step((1/60), 10, 10);
          pWorld.DrawDebugData();
          pWorld.ClearForces();
      }



The Frame update handles mapping the player graphic to the physics location
Code:
         //update the x and y with the physics properties
         this.x = (_obj.GetWorldCenter().x * ratio) - width/2 ;
            this.y = (_obj.GetWorldCenter().y * ratio) - height/2;
            angle = (_obj.GetAngle() * (180 / Math.PI)) + 90;



I am using flixel for rendering.

I run the application and they are matched up,
--> move the spaceship around a bit and its fine,
--> start moving some more and they get unsynchronized.
--> move back the opposite direction and they get resynchronized.

Really have no idea why this is happening.
I am applying force in the direction they are going with the W,S keys
Code:
   if (FlxG.keys.pressed("W"))
         {
            //limit the speed of the ship
            if (_obj.GetLinearVelocity().y < maxForwardSpeed && _obj.GetLinearVelocity().x < maxForwardSpeed) {
               
            
            var x:Number = Math.cos(_obj.GetAngle()) * forwardSpeed;
            var y:Number = Math.sin(_obj.GetAngle()) * forwardSpeed;
               
            force = new b2Vec2(x,y);
            var pos:b2Vec2 = _obj.GetWorldCenter();
            
            _obj.ApplyForce(force, pos);
            }
            
         }
         else if (FlxG.keys.pressed("S"))
         {
            //check for max linear velocity
            if (_obj.GetLinearVelocity().y < maxReverseSpeed && _obj.GetLinearVelocity().x < maxReverseSpeed) {
            
            var x:Number = Math.cos(_obj.GetAngle()) * reverseSpeed;
            var y:Number = Math.sin(_obj.GetAngle()) * reverseSpeed;
                        
            //apply the force in the opposite direction   
            force = new b2Vec2(-x,-y);
            var pos:b2Vec2 = _obj.GetWorldCenter();
            
            _obj.ApplyForce(force, pos);
            }
            
         }


the distance the object is seperated from the actual physics object gets greater when moving farther from the origin (0,0)

Any help would be appreciated.
so i traced out the positions of the object and the physics object....

Physics Object X: 341 Physics Object Y: 525
Player X: 341 Player Y: 525

They are the same but the debug drawing is what appears to be off.....

Has anyone had problems with the debug drawing falling out of sync? or not being in the location it should be at?
http://www.cocos2d-iphone.org/forum/topic/14659

found this issue where scrolling causes the debug drawing to be out of sync. same issue i am having.

anyone seen a fix for this?

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