Skip to content

Commit

Permalink
Merge pull request #105 from jrdoughty/main
Browse files Browse the repository at this point in the history
fix to camera panning with mouse
  • Loading branch information
rafaelcastrocouto authored Oct 9, 2022
2 parents 28c4376 + f53284f commit 8ccd230
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
.import/
AssetSources/
Prototype/export_presets.cfg
*.import
*.import
prototype/Shotcall.apk
prototype/Shotcall.apk.idsig
8 changes: 4 additions & 4 deletions prototype/controls/camera.gd
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,10 @@ func _unhandled_input(event):
if game:
var over_minimap = game.ui.minimap.over_minimap(event)
# MOUSE PAN
#if event.is_action("pan") and not over_minimap:
# is_panning = event.is_action_pressed("pan")
#elif event is InputEventMouseMotion:
# if is_panning: pan_position = Vector2(-1 * event.relative)
if event.is_action("pan") and not over_minimap:
is_panning = event.is_action_pressed("pan")
elif event is InputEventMouseMotion:
if is_panning: pan_position = Vector2(-1 * event.relative)


# TOUCH PAN AND ZOOM
Expand Down

0 comments on commit 8ccd230

Please sign in to comment.