hi,
i'm moving my b2Body horizontally alongwith stage mouseX....but while moving it, b2Body also moves vertically down and settle down after traveling some distance. Although i'm not passing any y position incremet.
I'm moving my body through SetXForm.
below is the code.
//======movement of my flash sprite======
_costume.x +=(stage.mouseX-_costume.x)/30
var newLocation:b2Vec2 = new b2Vec2(_costume.x + (stage.mouseX - _costume.x) / 30, 100);
var oldLocation:b2Vec2 = new b2Vec2( _costume.x, newLocation.y - _costume.y + 100)
//=======movement of b2Body ===========
ballBody.SetXForm(new b2Vec2(oldLocation.x / 30, oldLocation.y / 30), 0);
thanx in advance
i'm moving my b2Body horizontally alongwith stage mouseX....but while moving it, b2Body also moves vertically down and settle down after traveling some distance. Although i'm not passing any y position incremet.
I'm moving my body through SetXForm.
below is the code.
//======movement of my flash sprite======
_costume.x +=(stage.mouseX-_costume.x)/30
var newLocation:b2Vec2 = new b2Vec2(_costume.x + (stage.mouseX - _costume.x) / 30, 100);
var oldLocation:b2Vec2 = new b2Vec2( _costume.x, newLocation.y - _costume.y + 100)
//=======movement of b2Body ===========
ballBody.SetXForm(new b2Vec2(oldLocation.x / 30, oldLocation.y / 30), 0);
thanx in advance