Difference between revisions of "Team:Carnegie Mellon/game"
Line 777: | Line 777: | ||
function updateMouse(e){ ///doesn't work | function updateMouse(e){ ///doesn't work | ||
− | _mouseX = (e.clientX+window.pageXOffset | + | _mouseX = (e.clientX+window.pageXOffset-document.getElementById("gameWrapper").offsetLeft); |
_mouseY = (e.clientY+window.pageYOffset-document.getElementById("gameWrapper").offsetTop); | _mouseY = (e.clientY+window.pageYOffset-document.getElementById("gameWrapper").offsetTop); | ||
} | } |
Revision as of 13:47, 14 July 2015