mirror of
https://github.com/logsol/chuck.js.git
synced 2026-05-11 10:37:34 +00:00
implemented holding arm. fixes #75
This commit is contained in:
parent
03cb005372
commit
ebf167107a
3 changed files with 107 additions and 39 deletions
|
|
@ -340,7 +340,7 @@ function (Parent, Box2D, Settings, CollisionDetector, Item, Nc) {
|
|||
var bodyPosition = this.body.GetPosition();
|
||||
var handPosition = new Box2D.Common.Math.b2Vec2(
|
||||
bodyPosition.x + ((this.width / 2 / Settings.RATIO) * this.lookDirection),
|
||||
bodyPosition.y - this.height / 3 * 2 / Settings.RATIO // 2/3 of the body height
|
||||
bodyPosition.y - this.height / 4 * 2 / Settings.RATIO // 2/3 of the body height
|
||||
);
|
||||
|
||||
this.holdingItem.reposition(handPosition, this.lookDirection);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue