Skip to content

Commit

Permalink
ccc: do not consider PointerDrag when menu is shown
Browse files Browse the repository at this point in the history
  • Loading branch information
aduermael authored and gdevillele committed Apr 9, 2024
1 parent f709bfa commit 0942b65
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lua/modules/ccc.lua
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
mod = {}

controls = require("controls")
menu = require("menu")

defaultConfig = {
firstPerson = false, -- third person by default
Expand Down Expand Up @@ -126,6 +127,10 @@ mod.set = function(self, config)
end)

dragListener = LocalEvent:Listen(LocalEvent.Name.PointerDrag, function(pe)
if menu:IsActive() then
return
end

cameraWorldObject.Rotation.Y = cameraWorldObject.Rotation.Y + pe.DX * 0.01
cameraWorldObject.Rotation.X = cameraWorldObject.Rotation.X - pe.DY * 0.01

Expand Down

0 comments on commit 0942b65

Please sign in to comment.