diff --git a/joint/common.js b/joint/common.js index 3249ade..c0a0682 100644 --- a/joint/common.js +++ b/joint/common.js @@ -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()); } \ No newline at end of file diff --git a/joint/index.html b/joint/index.html index f96ed1f..d3689fe 100644 --- a/joint/index.html +++ b/joint/index.html @@ -10,8 +10,10 @@
- - - +
+
+
+
+