Skip to content

Commit cb9bb89

Browse files
authored
Fix Drag Mode During Gizmo Move (#1480)
1 parent d9ac34e commit cb9bb89

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

fission/src/systems/scene/DragModeSystem.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,8 @@ class DragModeSystem extends WorldSystem {
224224
}
225225

226226
private findDragTarget(mousePos: [number, number]): { bodyId: Jolt.BodyID; hitPoint: THREE.Vector3 } | undefined {
227+
if (World.physicsSystem.isPaused) return undefined
228+
227229
const result = rayCastForRigidBody(mousePos)
228230
if (!result || !this.isDraggable(result.association)) return undefined
229231
return { bodyId: result.bodyId, hitPoint: result.hitPoint }
@@ -370,6 +372,7 @@ class DragModeSystem extends WorldSystem {
370372

371373
private updateDragForce(): void {
372374
if (!this._dragTarget) return
375+
if (World.physicsSystem.isPaused) return
373376

374377
const body = World.physicsSystem.getBody(this._dragTarget.bodyId)
375378
if (!body) {

0 commit comments

Comments
 (0)