Skip to content

Commit ce1c486

Browse files
committed
No pointer interaction when mouseForce===0
1 parent 56193e7 commit ce1c486

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

.changeset/heavy-kings-hide.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"planck": patch
3+
---
4+
5+
No pointer interaction when mouseForce===0

testbed/StageTestbed.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import type { Body } from "../src/dynamics/Body";
77
import type { AABBValue } from "../src/collision/AABB";
88
import { Testbed } from "../src/util/Testbed";
99
import { MouseJoint } from "../src/dynamics/joint/MouseJoint";
10-
import { WorldComponent, WorldDragEnd, WorldDragMove, WorldDragStart, WorldPointerMove } from "./world-view";
10+
import { WorldComponent, WorldDragEnd, WorldDragMove, WorldDragStart } from "./world-view";
1111

1212
const math_PI = Math.PI;
1313

@@ -157,6 +157,7 @@ export class StageTestbed extends Testbed {
157157

158158
if (this.mouseForce) {
159159
targetBody = body;
160+
} else if (this.mouseForce === 0) {
160161
} else {
161162
mouseJoint = new MouseJoint({ maxForce: 1000 }, mouseGround, body, {
162163
x: point.x,

0 commit comments

Comments
 (0)