improve grappling hook physics and rendering
This commit is contained in:
parent
4753f879e5
commit
663305bd23
11 changed files with 129 additions and 55 deletions
|
@ -36,6 +36,14 @@ class Body {
|
|||
this.b2body.ApplyTorque(f);
|
||||
}
|
||||
|
||||
setRotation(r) {
|
||||
this.b2body.SetAngleRadians(r);
|
||||
}
|
||||
|
||||
setVelocity(x, y) {
|
||||
this.b2body.SetLinearVelocity(new b2Vec2(x, y));
|
||||
}
|
||||
|
||||
contact() {
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue