implemented holding arm. fixes #75

This commit is contained in:
Jeena 2014-06-14 18:37:21 +02:00
parent 03cb005372
commit ebf167107a
3 changed files with 107 additions and 39 deletions

View file

@ -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);