diff --git a/.changeset/heavy-kings-hide.md b/.changeset/heavy-kings-hide.md new file mode 100644 index 00000000..3f531225 --- /dev/null +++ b/.changeset/heavy-kings-hide.md @@ -0,0 +1,5 @@ +--- +"planck": patch +--- + +No pointer interaction when mouseForce===0 diff --git a/testbed/StageTestbed.ts b/testbed/StageTestbed.ts index 0c6d8926..1a3d999d 100644 --- a/testbed/StageTestbed.ts +++ b/testbed/StageTestbed.ts @@ -7,7 +7,7 @@ import type { Body } from "../src/dynamics/Body"; import type { AABBValue } from "../src/collision/AABB"; import { Testbed } from "../src/util/Testbed"; import { MouseJoint } from "../src/dynamics/joint/MouseJoint"; -import { WorldComponent, WorldDragEnd, WorldDragMove, WorldDragStart, WorldPointerMove } from "./world-view"; +import { WorldComponent, WorldDragEnd, WorldDragMove, WorldDragStart } from "./world-view"; const math_PI = Math.PI; @@ -157,6 +157,7 @@ export class StageTestbed extends Testbed { if (this.mouseForce) { targetBody = body; + } else if (this.mouseForce === 0) { } else { mouseJoint = new MouseJoint({ maxForce: 1000 }, mouseGround, body, { x: point.x,