@blorkfield/overlay-core 0.8.3 → 0.8.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -2377,11 +2377,17 @@ var OverlayScene = class {
2377
2377
  const entry = this.findObjectByBody(body);
2378
2378
  if (entry && entry.tags.includes("grabable")) {
2379
2379
  this.mouse.button = 0;
2380
+ this.mouseConstraint.constraint.pointA = { x: position.x, y: position.y };
2380
2381
  this.mouseConstraint.constraint.bodyB = entry.body;
2381
- this.mouseConstraint.constraint.pointB = {
2382
- x: position.x - entry.body.position.x,
2383
- y: position.y - entry.body.position.y
2384
- };
2382
+ this.mouseConstraint.constraint.pointB = { x: 0, y: 0 };
2383
+ console.log("[overlay-core] startGrab success", {
2384
+ entityId: entry.id,
2385
+ mousePosition: position,
2386
+ bodyPosition: { x: entry.body.position.x, y: entry.body.position.y },
2387
+ constraintPointA: this.mouseConstraint.constraint.pointA,
2388
+ constraintPointB: this.mouseConstraint.constraint.pointB,
2389
+ mouseButton: this.mouse.button
2390
+ });
2385
2391
  return entry.id;
2386
2392
  }
2387
2393
  }