implemented throwing

This commit is contained in:
logsol 2012-07-18 18:06:35 +02:00
parent 8d34e4a001
commit d679d61b64
2 changed files with 12 additions and 3 deletions

View file

@ -101,4 +101,11 @@ function jump(body) {
function drop() {
world.DestroyJoint(joint);
joint = null;
}
function throwItem(){
drop();
body = item;
body.SetAwake(true);
body.ApplyImpulse(new b2Vec2(-2, -.7), body.GetPosition());
}