scheffgames Posted March 30, 2017 Share Posted March 30, 2017 Hi! So I want to get mouse position even when it's outside canvas/game-world. The x,y properties stop updating when the mouse it's outside game world. Also tried worldX/worldY, clientX/clientY, screenX/screenY - to no succes. The only solution seems to write my own mousehandler (with document.onmousemove) but I wanted to know if I can do it in Phaser directly. I've used game.input.activePointer to check for above properties. Thanks! Link to comment Share on other sites More sharing options...
mattstyles Posted March 30, 2017 Share Posted March 30, 2017 I'd imagine this isn't really in Phaser scope, it should only know about the main element (can you pass it an element? I'd imagine it sets up with its own canvas element if you don't/can't supply one) and inputs should really be scoped to that element rather than polluting document. So I reckon you'd probably have to do this yourself unless you could pass `input` an element it should attach certain events to. scheffgames 1 Link to comment Share on other sites More sharing options...
Recommended Posts