Skip to content

Commit

Permalink
fix: simulator mazescene update
Browse files Browse the repository at this point in the history
  • Loading branch information
Aaron Christopher Tanhar committed Dec 3, 2023
1 parent ca93f9e commit d731f6c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Moco/View/User/Maze/MazeScene.swift
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ class MazeScene: SKScene, SKPhysicsContactDelegate, ObservableObject {
}
#if targetEnvironment(simulator)
if let currentTouch = lastTouchPosition {
let diff = CGPoint(x: currentTouch.x - player.position.x, y: currentTouch.y - player.position.y)
let diff = CGPoint(x: currentTouch.x - moco.position.x, y: currentTouch.y - moco.position.y)
physicsWorld.gravity = CGVector(dx: diff.x / 100, dy: diff.y / 100)
}
#else
Expand Down

0 comments on commit d731f6c

Please sign in to comment.