So I'm making some bullets in box2d and it's taking a ton of time. I'm starting by just throwing a MovieClip at is and on-contact running this:
(50% of that was taken from various tutorials)
But now I'd like angular velocity to take effect, I actually think I'm going about this all wrong. Can someone lend a hand?
Also I'm using WCK, that why some of my code my look a bit weird (V2 is a b2Vec2 etc...)
Code:
var pHitVector:V2 = new V2(crateArray[i].x - bulletArray[j].x, crateArray[i].y - bulletArray[j].y);
var appForce:V2 = new V2(pHitVector.x * .1, pHitVector.y * .1);
crateArray[i].b2body.ApplyImpulse(appForce, crateArray[i].b2body.GetWorldCenter());
var appForce:V2 = new V2(pHitVector.x * .1, pHitVector.y * .1);
crateArray[i].b2body.ApplyImpulse(appForce, crateArray[i].b2body.GetWorldCenter());
(50% of that was taken from various tutorials)
But now I'd like angular velocity to take effect, I actually think I'm going about this all wrong. Can someone lend a hand?
Also I'm using WCK, that why some of my code my look a bit weird (V2 is a b2Vec2 etc...)