diff --git a/app/Game/Client/Control/Inputs/KeyboardAndMouse.js b/app/Game/Client/Control/Inputs/KeyboardAndMouse.js index 50af8a1..46f33f8 100644 --- a/app/Game/Client/Control/Inputs/KeyboardAndMouse.js +++ b/app/Game/Client/Control/Inputs/KeyboardAndMouse.js @@ -222,7 +222,7 @@ function (Parent, KeyboardInput, domController, Settings, Swiper) { KeyboardAndMouse.prototype.deactivateModifier = function() { this.modifier = false; this.x = this.lastLookDirection * Settings.VIEWPORT_LOOK_AHEAD; - this.y = 0; + this.y = this.y; this.onXyChange(this.x, this.y); this.playerController.deactivateModifier(); }; diff --git a/app/Game/Client/GameObjects/Item.js b/app/Game/Client/GameObjects/Item.js index 9e036d3..6b01cf6 100755 --- a/app/Game/Client/GameObjects/Item.js +++ b/app/Game/Client/GameObjects/Item.js @@ -33,6 +33,16 @@ function (Parent, Settings, nc, Layer) { nc.trigger(nc.ns.client.view.mesh.add, self.layerId, mesh); } + // Determine pivot point based on item type + var pivotY; + if (this.options.type === "circle") { + // For circular items, center the pivot + pivotY = this.options.height / 2; + } else { + // For rectangular items, pivot at bottom center + pivotY = this.options.height; + } + nc.trigger(nc.ns.client.view.mesh.create, this.layerId, texturePath, @@ -42,7 +52,7 @@ function (Parent, Settings, nc, Layer) { height: this.options.height, pivot: { x: this.options.width / 2, - y: this.options.height + y: pivotY } } );