There was an error while loading. Please reload this page.
1 parent d9ac34e commit cb9bb89Copy full SHA for cb9bb89
1 file changed
fission/src/systems/scene/DragModeSystem.ts
@@ -224,6 +224,8 @@ class DragModeSystem extends WorldSystem {
224
}
225
226
private findDragTarget(mousePos: [number, number]): { bodyId: Jolt.BodyID; hitPoint: THREE.Vector3 } | undefined {
227
+ if (World.physicsSystem.isPaused) return undefined
228
+
229
const result = rayCastForRigidBody(mousePos)
230
if (!result || !this.isDraggable(result.association)) return undefined
231
return { bodyId: result.bodyId, hitPoint: result.hitPoint }
@@ -370,6 +372,7 @@ class DragModeSystem extends WorldSystem {
370
372
371
373
private updateDragForce(): void {
374
if (!this._dragTarget) return
375
+ if (World.physicsSystem.isPaused) return
376
377
const body = World.physicsSystem.getBody(this._dragTarget.bodyId)
378
if (!body) {
0 commit comments